
May 6th, 2008, 04:08 PM
|
 |
Contributing User
|
|
|
|
|
Well, Visual Studio now has C++ and C++.Net. They are 2 different things.
If you are only using C++ (without the .Net part) then very little has changed. MFC even still works pretty much the same.
There are, however, a few important differences. The newer version adheres more closely to the standard, and therefore some of your code may have to change. For example, just with file streams I recall off the top of my head that you can no longer pass them to functions by reference, and if you close a stream variable and want to re-open it you must also call .clear() first.
If you are using C++.Net, then there is the addition of a new kind of pointer that points to managed objects. It's denoted with ^, intead of *. There is a new gc_new operator that you'll use most of the time instead of the old 'new' operator, and items allocated with gc_new do not need to be deleted. Finally, you have access to namespaces and classes within the .Net framework.
For C++.Net, the framework replaces everything that used to live in MFC libraries; hardly anything from MFC carried over to .Net exactly the way it was before, and the .Net framework is much larger than MFC was. Database access, for example, is now available through classes in the System.Data namespace rather than CDatabase, which no longer exists.
I don't really recommend using C++.Net. It's an awkward mashup, imo. You obviously already have visual studio, so if you have the leeway you might find that C# is even easier to pick up than C++.Net.
------------------------------
@weevil: The only reason to use ODBC to talk to SQL Server is if you're building the program to work on linux. There are native drivers for windows and mac that work much better, and with the mono project they may even be available for linux now, too.
Last edited by DrStrangluv : May 6th, 2008 at 04:19 PM.
|