我是菜乌,帮忙看看这段代码怎么错了?
#include <iostream> ;
int main(int argc,char* argv[])
{char name[10];int age;
cout < < "input your name and age: " < <endl;
cin> > name> > age;
cout < < "your name is : " < <name < <endl;
cout < < "your age is : " < <age < <endl;
while(1) getchar();
return0;
}
在C++ builder6.0中运行,总是报错???????
[解决办法]
#include <iostream> ;
改为
#include <iostream.h> //注意不要 '; '