若要在C盘根目录下作为二进制文件打开文件test.dat,则应该用的语句是【 】。
参考答案:ifstream fin("C:\test.dat",ios_binary);或ifstream fin;fin.open(c:\test. daf"ios_binary);
解析:C++中打开文件有两种方式①ifstream fin("test.dat");②ifstream fin;fin.open("test.dat");,ios_binary的意义是以二进制文件打开。
若要在C盘根目录下作为二进制文件打开文件test.dat,则应该用的语句是【 】。
参考答案:ifstream fin("C:\test.dat",ios_binary);或ifstream fin;fin.open(c:\test. daf"ios_binary);
解析:C++中打开文件有两种方式①ifstream fin("test.dat");②ifstream fin;fin.open("test.dat");,ios_binary的意义是以二进制文件打开。
My life is always full of sadness and little joy. However, no matter(无论) what happens, I can always face it bravely. Last year, I couldn’t believe the 1 that I could enter the only key high school in my hometown. Then I rushed to my home and told my parents. But my father didn’t seem as 2 as I was. He just kept smoking without saying a word and my mother put her head down and couldn’t help 3 . I knew very well what my family was 4___ . My mum had been ill in bed for 2 years. We lived a hard life and I couldn’t continue my schooling. I felt so upset(心烦意乱) but I could say 5 to my parents. I decided to help my father with his work 6 my family. To my surprise, things completely changed 7 the beginning of the new term. My head teacher came to my family with some money, which was 8 by my schoolmates. He encouraged me, “Always have a dream.” With tears in my eyes, I stepped into the key high school. I have been studying hard since I entered the high school. No matter when I meet difficulties, I always 9 my teacher and schoolmates. I have a college dream and I must work hard for it, no matter how 10 life is. Just as a great man says, “When one door shuts, another opens in life.”
|