Wednesday, September 21, 2005

Updating from VC++6.0 to VC++7.1

I've been using Microsoft Visual Studio 6 for more than five years. Now its time to move on. Therefore, I installed Microsoft Development Environment 2003. Then, I made the necessary changes in some of my projects in order to compile them with MS VC++7.1.

Below I list a simple change that was necessary, but took me lots of time to figure it out:

Where before was:

#include <fstream.h>

Now must be:

#include <fstream>
using namespace std;

So, if you try to compile code in MS VC++7.1 that uses fstream don't forget to specify the namespace you are using. I hope this helps you save precious time.

No comments: