Jump to content

  • Log In with Google      Sign In   
  • Create Account


C++ problem in best program to use


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Sugavanas   Members   -  Reputation: 153

Like
0Likes
Like

Posted 22 November 2012 - 07:02 AM

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,

Sponsor:

#2 Radikalizm   Crossbones+   -  Reputation: 2776

Like
0Likes
Like

Posted 22 November 2012 - 07:05 AM

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.

I gets all your texture budgets!


#3 SiCrane   Moderators   -  Reputation: 9418

Like
0Likes
Like

Posted 22 November 2012 - 07:10 AM

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".

#4 Alin   Members   -  Reputation: 391

Like
0Likes
Like

Posted 30 November 2012 - 08:40 AM

Dont use "stdafx.h" if your project hasn't a precompiled header

#5 Zaoshi Kaba   Crossbones+   -  Reputation: 3670

Like
0Likes
Like

Posted 30 November 2012 - 09:13 AM

Sounds like you created wrong project type. Choose Empty Project next time, it won't have precompiled headers.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS