I've successfully installed M$ VC2010 and start writing simple programs using it.
I am very annoyed from the #include<stdafx.h>
, So is there any way to compile and run programs without it???
stdafx. h is basically used in Microsoft Visual Studio to let the compiler know that the files are once compiled and no need to compile it from scratch.
Precompiled Header stdafx. h is basically used in Microsoft Visual Studio to let the compiler know the files that are once compiled and no need to compile it from scratch. The compiler would always compile this header files from scratch.
Stdafx. cpp is that one . cpp file. It has a setting that's different from all the other . cpp files, it gets built with /Yc.
It's for pre-compiled headers. Don't use pre-compiled headers, don't include it.
Goto Project Settings->Precompiled Headers.
Select Not using precompiled headers.
You can also turn off precompiled headers per file.
Setting this in VS Express C++ 2012 is as follows:
Cheers
Of course, just go to Project Settings, C/C++ → Precompiled Headers, and choose "Not Using Precompiled Headers".
BTW: On large projects using precompiled headers may significantly decrease build time.
When you create your project, create an empty project.
For now, you can disable it in Project Settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With