填空题
下面程序要实现的功能是打开当前目录下的文件abc,并向其追加一串字符“How are you!”,然后再关闭该文件,请将程序填写完整。
#include<fstream.h>
void main()
[13]
f<<"How are you!"<<end1;
f.close();
【参考答案】
ofstream f( "abc" , los: :app)
点击查看答案
<上一题
目录
下一题>
热门
试题
填空题
目前,有两种重要的高级语言,分别是结构化程序和______。
点击查看答案
填空题
程序的输出结果是______。 #include<iostream> using namespace std; class Base int x; Public: Base(int B):x(B) virtual void display( )cout<<x; ; class Derived:public Base int y; public: Derived(int D):Base(D),y(D) void display( )cout<<y; ; int main( ) Base b(1) ;Derived d(2); Base*p=&d; b.display( );d.display( );p—>display( ); return 0;
点击查看答案
相关试题
友元类的所有成员函数都是另一个类的___...