Jump to content
  • Advertisement
Sign in to follow this  
Sugavanas

C++ problem in best program to use

This topic is 2054 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Guys i am learning c++ and i have problem, the book i use to learn is c++ all in one for dummies 2nd edition, it uses code blocks and for the first program it gives a code in the console application as,


#include <iostream>
using namespace std;
int main()
{
cout << "Hello, I am your computer talking." << endl;
cout << 5 + 10 << end1;
return 0;
}


When i type in the same code in vs 2012, it shows a error that #include "stdafx.h" is missing.

Can you guys explain it to me more,

Share this post


Link to post
Share on other sites
Advertisement
The VS2012 project you're working on apparently has precompiled headers enabled, you can turn these off in your project's settings as they will be of little use to you right now.

Share this post


Link to post
Share on other sites
It's looking for a precompiled header which is something used to improve compile times. However, if you're just starting out you can ignore using a precompiled header. When you create a new C++ project when it shows you the a dialog that contains an "Application settings" page you can disable precompiled headers by unclicking the checkbox. Or after creating the project go to project properties and under C/C++ there should be "Precompiled headers" page. Go switch the "Precompiled header" setting to "Not Using Precompiled Headers".

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!