Microsoft Visual Studio 2008 - first steps

Some time ago, I've noticed that many novice C++ programmers still use obsolete Dev-C++ IDE, which is in my opinion quite uncomfortable and buggy. I wonder why they won't try something else, e.g. Code::Blocks or... Microsoft Visual Studio. I think it's one of the best IDEs for Windows. At first glance, one might feel a bit overwhelmed with the huge number of features it offers. The truth is that when one learns the basics, VS appears to be very easy and convenient in use. To prove it, I've written the short step-by-step tutorial showing how to compile the simpliest "Hello World" program with Visual Studio 2008:

  1. Choose File --> New --> Project...
  2. Select  Win32 Console Application template and click OK.
  3. Click Next.
  4. Deselect Precompiled header option and click Finish.
  5. Go to Solution Explorer. If it isn't shown by default, you can make it visible by choosing View --> Solution Explorer menu option. Then delete the following files: stdafx.h, targetver.h, stdafx.cpp and ReadMe.txt .
  6. There should be only one .cpp file left. Its default content looks like this:

    We will make it simplier by removing fragments marked red:

    // HelloWorld.cpp : Defines the entry point for the console application.
    //
    #include "stdafx.h"
    
    int _tmain(int argc, _TCHAR* argv[])
    {
        return 0;
    }

    So the modified code is:

    int main()
    {
        return 0;
    }
  7. Now you can type some simple C/C++ code and press F5 to compile and run the application.
As you can see, Visual Studio is not so scary and I'm sure that every programmer (even beginner) can successfully use it. So why won't you have a try?