求教:vc ++ 6.0 编译0 erros,但link出错。
我刚学c++
求教:vc ++ 6.0 编译能通过,但link出错。
很简单的一段程序啊,估计vc++软件的问题,哪儿不对呢?
//Fig.1.2:fig01_02.cpp
//A first programe in c++
#include <iostream>
begins programe execution
int main()
{
std::cout <<"welcome to c++!\n";
return 0;
} //end function main
//function main
--------------------Configuration: greet - Win32 Debug--------------------
Compiling...
greet.cpp
C:\greet\greet.cpp(4) : error C2146: syntax error : missing ';' before identifier 'programe'
C:\greet\greet.cpp(4) : error C2501: 'begins' : missing storage-class or type specifiers
C:\greet\greet.cpp(4) : fatal error C1004: unexpected end of file found
执行 cl.exe 时出错.
greet.exe - 1 error(s), 0 warning(s)
[此贴子已经被作者于2006-2-20 10:14:01编辑过]