我是新手学习C ++编程,尝试通过网站(learncpp.com)自学,但我已经卡在了编译我的第一个程序上=(。他们使用Visual Studio来编写他们的代码,因为我正在使用MacBook,所以我只使用vi和终端(或者我应该使用其他工具)
这是我根据教程编写的helloworld.cpp程序:
#include "stdafx.h"
#include <iostream>
{
std::cout <<"Hello World!" <<std::end1;
return 0;
}
当我编译(hello.cpp)时,出现了以下错误:
helloworld.cpp:1:10: fatal error: 'stdafx.h' file not found
#include "stdafx.h"
^
1 error generated.
有人可以给我提供解决这个问题的见解吗?
#include "stdafx.h"
。 - haccksendl
(E-N-D-L),而不是end1
(E-N-D-one) - Blue Ice