VC上直接运行的时候会在程序结束时暂停,但是单独运行该程序时则不会有暂停,
在程序末尾加上system("pause");
#include "iostream.h"换成#include <iostream>
谢谢您啊,不过改了之后出现一大堆错误...
Compiling...
aa.cpp
D:\Program Files\Microsoft Visual Studio\程序\aa.cpp(5) : error C2065: 'cout' : undeclared identifier
D:\Program Files\Microsoft Visual Studio\程序\aa.cpp(5) : error C2297: '<<' : illegal, right operand has type 'char [14]'
D:\Program Files\Microsoft Visual Studio\程序\aa.cpp(6) : error C2065: 'cin' : undeclared identifier
D:\Program Files\Microsoft Visual Studio\程序\aa.cpp(6) : warning C4552: '>>' : operator has no effect; expected operator with side-effect
D:\Program Files\Microsoft Visual Studio\程序\aa.cpp(8) : error C2297: '<<' : illegal, right operand has type 'char [12]'
D:\Program Files\Microsoft Visual Studio\程序\aa.cpp(9) : warning C4552: '>>' : operator has no effect; expected operator with side-effect
D:\Program Files\Microsoft Visual Studio\程序\aa.cpp(11) : error C2297: '<<' : illegal, right operand has type 'char [14]'
执行 cl.exe 时出错.
aa.exe - 1 error(s), 0 warning(s)
怎么回事啊?
你不知道要在#include<iostream>下加using namespace std;吗?