Anybody,.. i was coding a program based a tutorial and than, i didn't find a file header in include dir, for example <stdafx.h>, because error message told me about that. Can i find it by download and put that h file in include dir? Thanks.
It's a pre-compiled header. If you've created your project, then you probably don't need this if you don't know what it is. To get rid of this error:
1. Remove references to <stdafx.h> in your source files.
2. Right click on your project in the Solution Explorer.
3. Choose 'Properties'
4. In the property window, select Configuration Properties > C/C++ > Precompiled headers.
5. In the "Precompiled Header" field, select "Not using precompiled headers"
Mind about posting your error message at least?
We could solve your problem 10 times faster, if you tell us what's the error message. Anyways, if it's about "Missing precompiled header" or similar, you have to turn off the precompiled header option in your project settings.
EDIT: Just noticed, there is no entry point. Declare your "int main()" function.
RE-EDIT: You just needed three includes: <cstdio>, <cmath> and <iostream>.
RE-RE-EDIT: Change your "system("pause")" into "cin.get()".
Did you try to remove the ' #include "stdafx.h" ' line at least?
You cannot find "Precompiled header" in project options because you are using wxDev-C++ (So also ignore that part on my post)
EssGeEich..
i was removed #include "stdafx.h" and the error message that is,
[Linker error] undefined reference to 'WinMain@16'
ld returned 1 exit status.
[Build error][Output/MingW/grap.exe] Error 1
It's nothing related to stdafx. You have to declare your main function. Where is your program supposed to start? It has no start. Did you notice? It simply asks you to create a starting point.