[求助]dev c++的运行窗口问题
我们学校开可c++课程
比较浅显
我用dev c++编程序时候
在运行窗口输入变量时
一按回车运行窗口就关掉了
这个问题怎么解决?
我们学校开可c++课程
比较浅显
我用dev c++编程序时候
在运行窗口输入变量时
一按回车运行窗口就关掉了
这个问题怎么解决?
[此贴子已经被作者于2006-7-25 17:38:42编辑过]
#include <iostream>
#include <fstream>
#include <cstdlib>
using namespace std;
class Test
{
public:
Test()
{
cout<<\"make constructor\n\";
}
~Test()
{
ofstream fout(\"test.txt\");
fout<<\"make destructor\";
fout.close();
}
};
int main()
{
Test t;
system(\"pause\");
return 0;
}
[此贴子已经被作者于2006-7-25 19:58:18编辑过]
那如果没有renturn 0呢??是不是在main退出之前一定完成所有对象析构动作??包括static object??