![]() |
Starting C++ and have a quick question about MS Studio
Im suing Visual Studio and currently im working thru a book C++ primer by stephen prata which is a good book so far.
I noticed something though in each of my console programs I am making. I have to have this #include "Staffix.h" (Or something close, im not at my computer right now so forgive me) I tried to remove it an program wont work. Odd, the book said nothing about this line and yet it is required. Hmmmm... enlighten me? I understand includes and <iostream> but I cant find what this line is for and why it is required. |
Did you mean: #include "Stdafx.h"?
I think that is a line that you must include with Visual Studio, but I am not sure why. You won't have to include it if you use a different compiler, like Dev-C++, which is a free, open-source compiler. |
Quote:
:
// stdafx.h : include file for standard system include files,nice little link here with visualizations: http://www.hydrairc.com/doxygen/stdafx_8h.html |
which complier would be best to use? I have visual studio but I mean if something out there is better, I want to learn from the best program...
|
Search the forums, or use Dev-C++. There are about a million threads on "What is the best compiler", I'm sure that you could find an answer somewheres around here. :)
|
>You won't have to include it if you use a different compiler
Translation: "I don't know how to use that compiler, so *you* shouldn't use it". ;) I mean, really. If you're going to plug Dev-C++ (not necessarily a bad thing), you could at least base your recommendation on facts rather than ignorance. >which complier would be best to use? It depends on your needs. Find the one you're most comfortable with. Common compilers that can be freely acquired are Visual C++ Express 2005, Dev-C++, Borland C++ 5.5, and GCC. >Odd, the book said nothing about this line and yet it is required. Your book probably doesn't focus on Visual C++. The problem is that you're using the silly default console program option when creating a project. You want an empty project, then you don't need to use stdafx.h. |
Quote:
|
>The fact is is that you don't have to include that line in Dev-C++ to be able
>to compile a console program. Well, I can't argue with you there. :rolleyes: But it's also a fact that you don't need to switch compilers to disable that requirement. It's actually a much simpler solution than downloading and installing Dev-C++, then learning the new interface and a whole new set of quirks. >For this guy, apparently, he does in VS. It's a compiler setting. When someone complains that the console window opens and closes too quickly in Dev-C++, do you recommend that they use a different compiler? |
Quote:
And yes, you are right. No, I would not recommend switching compilers just because your window opens and closes really fast. I have never used VS, so I will shut up now. |
No no, Im new to this whole thing. I have the "free" version of VS 2005. But if there is something better out there to use, please suggest it!
Eventually I hope to get my BA and then get a job doing this but this is step one. All suggestions are welcomed |
| All times are GMT -5. The time now is 8:06 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC