Visual C++ 05 Express Setup

Started by
7 comments, last by KittyRa 17 years, 6 months ago
Hi, I have tried to setup the PSDK and I am starting to get frustrated because the compiler didn't recognise iostream.h I have followed the instruction on the microsoft website and still have had no success. Is there any way I reset the directories and settings so that I can attempt to do this again because when I uninstalled VC++ and installed again the directory links to the PSDK where still there. I am finding it difficult to get started with C++ in VC++ and any help to get me on the way would be great.
Advertisement
The platform SDK does not contain iostream.h, only iostream. That is, you should be using
#include <iostream>
rather than
#include <iostream.h>
Are there a tutorials around that teach C++ specifically for MSVC++? Because from what i've read in the past it is slightly different to DevC++ which I have used before.
iostream is part of the SC++L, and you shouldn't need the platform SDK for it.
Sounds more like something went slightly wrong during install or you were not including the header properly.

If you do happen to find yourself a "MSVC-specific" C++ tutorial or a "Dev-C++-specific" one, you'll want to immediately navigate away from it and find a better tutorial.

In general, C++ is C++, regardless of which compiler and IDE you use (as long as it is halfway decent, of course); you want a reference that teaches you C++. Of course, all compilers provide optional extensions(*) to the language, but you shouldn't be concerning yourself with those yet; the core of the language is the same.

(*) It's usually easy to spot these extensions; either the compiler will issue a warning about them, or you will be using an identifier that starts with two underscores, or something along those lines.
Quote:Original post by Jozers
Are there a tutorials around that teach C++ specifically for MSVC++? Because from what i've read in the past it is slightly different to DevC++ which I have used before.


From the actual programming part the differences are negligible. You may encounter compiler extensions, but if you get a book on C++ they won't teach you those extensions. The real differences aren't in the coding, but in the environment. Setting up the IDE environment and the tools the IDE provides are different. But if you know the IDE you can easily type code that will work with DevC++, MSVC++, and Code::Blocks.

If you found a tutorial which uses iostream.h instead of iostream you are using a tutorial written nearly a decade ago or by someone who doesn't really know the language and is just copying what he/she learned from another faulty tutorial. This is because back when iostream.h existed there WAS no C++ standard. That was in 1998, 8 years ago.

MSVC++ 6.0 came out right about that time and had a lot of deficiancies from what the standard ended up as. MS created a large market share using that IDE and so a lot of people learned that version of C++. However, MS eventually released an updated compiler with much better compliance with the C++ standard.

So there's no reason why anyone whould ever use iostream.h ever again unless for some reason they work a job that hasn't updated their compiler in over 8 years Really, 8 years in computing is Forever. 8 years ago almost no one had a 3d video card. When MS Vista is released it will require one.

In conclusion: you may need to find a tutorial on setting up MSVC++, but once you get it set up you can just use a generic C++ tutorial. If that tutorial uses iostream.h it probably sucks. Best would be to find a book recommended by some of the users on this forum. You can easily do a search for something like "good C++ books." I haven't used it myself, but several people seem to like "Beginning C++ Game Programming"

C++: A Dialog | C++0x Features: Part1 (lambdas, auto, static_assert) , Part 2 (rvalue references) , Part 3 (decltype) | Write Games | Fix Your Timestep!

When I try and compile even something basic like below:

#include <iostream>

using namespace std;

int main()
{
cout<<"Hello World!\n";
cin.get();
}


The compiler says the build was successful but does not display the program on screen. I usually have more problems when compiling code to build a win32 window app, code that works in Dev C++ does not work in MSVC++ 05 EE.
Quote:Original post by Jozers
When I try and compile even something basic like below:

#include <iostream>

using namespace std;

int main()
{
cout<<"Hello World!\n";
cin.get();
}


The compiler says the build was successful but does not display the program on screen. I usually have more problems when compiling code to build a win32 window app, code that works in Dev C++ does not work in MSVC++ 05 EE.

Well first: that won't build a Win32 app. Second: that code will work on VC++ EE and Dev-C++ and any other compiler/IDE you throw at it.

Lastly, you should take the time to read up on building a Win32 app and building a console app. Afterwards your only problem should be #include <stdafx.h>.

Beginner in Game Development?  Read here. And read here.

 

I know that the program above will not create a win32 window.

The problem I am having is that the "Hello World" program compiles successfully but does not display the program on screen.

The reason I mentioned win32 was because I have had problems compiling things written in DevC++ in the VC++ compilier.
Once you've built it you have to run it. Press F5.
F-R-E-D F-R-E-D-B-U-R...G-E-R! - Yes!

This topic is closed to new replies.

Advertisement