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"
I'm not sure about this,but i want to ask you did you try the lastest version of Dev C++?
If you are using Visual Studio, when creating a new project you should make sure that the option 'using precompiled headers' is off.
Oh, and remove
#include <stdafx.h> from your program.