关于Visual c++2005的问题,知道的或者遇到过类似情况的请回答

来源:百度知道 编辑:UC知道 时间:2024/06/20 07:43:48
关于Visual c++2005的问题,知道的或者遇到过类似情况的请回答

#include <iostream>
using namespace std
int main()
{
cout<<"第一个程序\n";
return 0;
}
这段代码运行后出现
1>------ Build started: Project: 第一个程序, Configuration: Debug Win32 ------
1>Compiling...
1>第一个程序.cpp
1>d:\backup\我的文档\visual studio 2005\projects\第一个程序\第一个程序\第一个程序.cpp(3) : error C2144: syntax error : 'int' should be preceded by ';'
1>Build log was saved at "file://d:\Backup\我的文档\Visual Studio 2005\Projects\第一个程序\第一个程序\Debug\BuildLog.htm"
1>第一个程序 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
提示系统找不到该文件夹
我就纳闷了。。。知道请告诉我决绝方法,感激不尽。。
打错两个字 告诉我解决方法

include <iostream>
using namespace std;//这里你忘了键入;
int main()
{
cout<<"第一个程序\n";
return 0;
}
复制到你的编辑器里,重新编译就过了

using namespace std后面要加上;结尾

哪是什么找不到文件夹错误,就是LS说的,你明明在命名空间声明尾部忘打";"了