I am new to C ++ programming and try to study on sites (learncpp.com), although I was already stuck in compiling my first program = (they use Visual Studio to program their code and because I use macbook, I just use vi and terminal (or should I use something else?)
Here's the helloworld.cpp program, written from a tutorial:
#include "stdafx.h"
#include <iostream>
{
std::cout <<"Hello World!" <<std::end1;
return 0;
}
when I compiled (gcc -Wall hello.cpp), I get an error:
helloworld.cpp:1:10: fatal error: 'stdafx.h' file not found
#include "stdafx.h"
^
1 error generated.
Can someone let me know how to fix this?
source
share