求助!!帮忙看一下我得问题!
代码如下:
情况是不能正常结束程序,必须通过强行关闭程序才行,而且打开a.txt文件时空的,为什么????指教!如何改正
int main(){
char m_word;
ofstream outfile("a.txt");
if (!openfile) { cerr<<"worse!"<<endl;return 0;};
while (cin.get(m_word)) openfile.put(m_word);
if (!cin) cerr<<"input is worse!!!!!!";
}