Sep 7, 2015 at 12:50am
I can't seem to understand why I'm getting these errors with my header files. What am I doing wrong here?
#include <stdafx.h>
#include <iostream> // for std: :cout and std: :endl
void doPrint()
{
std::cout << "In doPrint()" << std::endl;
}
int main()
{
std::cout << "Starting main()" << std::endl;
doPrint();
std::cout << "Ending main()" << std::endl;
return 0;
}
I'm getting a Error C1083 and it's saying I can't open source file "stdafx.h"
Sep 7, 2015 at 3:16am
I'm not sure about this,but i want to ask you did you try the lastest version of Dev C++?
Sep 7, 2015 at 3:20am
If you are using Visual Studio, when creating a new project you should make sure that the option 'using precompiled headers' is off.
Sep 7, 2015 at 3:22am
Oh, and remove
#include <stdafx.h> from your program.