Visual C++ 05 Express Setup

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

Recommended Posts

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.

Share on other sites
The platform SDK does not contain iostream.h, only iostream. That is, you should be using
#include <iostream>
rather than
#include <iostream.h>

Share on other sites
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.

Share on other sites
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.

Share on other sites
Quote:
 Original post by JozersAre 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"

Share on other sites
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.

Share on other sites
Quote:
 Original post by JozersWhen I try and compile even something basic like below:#include 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>.

Share on other sites
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.

Share on other sites
Once you've built it you have to run it. Press F5.

Share on other sites

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

Create an account

Register a new account

• Forum Statistics

• Total Topics
628654
• Total Posts
2984055

• 10
• 9
• 9
• 10
• 21