Sign in to follow this  

Difference between Visual C++ 6.0 and Visual C++.net?

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Here is my current libary of books, on my way to becoming able to code and game develop. I would like to code for the Xbox, and make mods for the upcoming HL2. Tricks of the Windows Game Programming Gurus (2nd Edition) Special Effects Game Programming with DirectX C++ by Dissection Big C++ Introduction to Programming with C++ (3rd Edition .Net) Introduction to Programming with C++ (2nd Edition 6.0) Focus on SDL I have gotten through my first book, Introduction to Programming with C++(2nd edition.) I used an Intro copy of Visual C++ 6.0. However, now when I try to code in .Net, everything is different. The Introduction to Programming with C++(3rd Edition .Net) is a lot different. For instance. In 6.0 you could use the getline function to get a line of input text. However in .net, it's something like something::readline(). All the funtions now have scope resolution operators. Basically I don't know what to do. Should I just work through, the .Net book. However, my Big C++ and C++ by Dissection are 6.0 based I think. I got the Big C++ book, from my college book store. That's the book they are teaching this year, for C++. How different are 6.0 and .net? I thought it was all C++? What's my best course of action. In the book I went through I learned arrays, objects, classes, general math, if, thens, repetition, and some other stuff. I just am a little confused. What should I do? Can you recommend any more good books?

Share this post


Link to post
Share on other sites
Quote:
Original post by ncasebee
Here is my current libary of books, on my way to becoming able to code and game develop. I would like to code for the Xbox, and make mods for the upcoming HL2.

Tricks of the Windows Game Programming Gurus (2nd Edition)
Special Effects Game Programming with DirectX
C++ by Dissection
Big C++
Introduction to Programming with C++ (3rd Edition .Net)
Introduction to Programming with C++ (2nd Edition 6.0)
Focus on SDL

I have gotten through my first book, Introduction to Programming with C++(2nd edition.) I used an Intro copy of Visual C++ 6.0. However, now when I try to code in .Net, everything is different. The Introduction to Programming with C++(3rd Edition .Net) is a lot different. For instance. In 6.0 you could use the getline function to get a line of input text. However in .net, it's something like something::readline(). All the funtions now have scope resolution operators. Basically I don't know what to do. Should I just work through, the .Net book. However, my Big C++ and C++ by Dissection are 6.0 based I think. I got the Big C++ book, from my college book store. That's the book they are teaching this year, for C++.

How different are 6.0 and .net? I thought it was all C++? What's my best course of action. In the book I went through I learned arrays, objects, classes, general math, if, thens, repetition, and some other stuff. I just am a little confused.

What should I do? Can you recommend any more good books?


I also use c++.net, and as far as I know, you can still program pretty much the same way as 6.0, with a few changes here and there. C++.net has a few additional libraries and I'm told it's similar to c# and java-style programming, but you can use either style, depending on whatever you're comfortable with. It probably won't hurt to learn both styles, anyway.

To be more specific, just include the older header files and you'll be fine with what you've already learned.

Share this post


Link to post
Share on other sites
.Net is a nickname Microsoft coined meaning "buy all our new stuff." It has nothing to do with C++. The same programs will work in Visual C++ 6.0 and .Net.

The same getline stuff should work in .net, unless all of the correct headers weren't installed for some reason. Since the language didn't change, scope modifiers haven't changed. The same rules apply. If you didn't have to use them in 6.0, then it's because you got lucky.

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
Visual C++.NET is better in every possible way...except maybe slow computer friendliness. It doesn't require you to use .NET at all.

I agree. The .NET IDE is much better.

I realize that "everything should be working" isn't the answer you were really looking for, but if you're having trouble with anything that worked in 6.0, posting some code might get you more helpful answers to your specific questions.

Share this post


Link to post
Share on other sites
As far as what you could do, I would recommend -not- spending your time reading the C++ book at it relates to C++.NET. That is unless you want to learn to code in Managed C++, which is different from the other books you have that will be using Unmanaged C++.

I believe that it is better to stay away from spending time learning .NET now, because for one thing there's the issue of platform independence (.NET is a Microsof thing). C++ has been around for some time, and while I don't want to start one of those high-level vs lower-level coding fights, I think if you're learning then you should stick to the basics which right now is C++.

Share this post


Link to post
Share on other sites
Quote:
Original post by wyrzy
As far as what you could do, I would recommend -not- spending your time reading the C++ book at it relates to C++.NET. That is unless you want to learn to code in Managed C++, which is different from the other books you have that will be using Unmanaged C++.

I believe that it is better to stay away from spending time learning .NET now, because for one thing there's the issue of platform independence (.NET is a Microsof thing). C++ has been around for some time, and while I don't want to start one of those high-level vs lower-level coding fights, I think if you're learning then you should stick to the basics which right now is C++.


Actually, as far as I know, .NET is a standard/platform. They may have created it, but it can be ported. Ala the Mono Project.

Share this post


Link to post
Share on other sites
Quote:
Original post by wyrzy
(.NET is a Microsof thing)
Nope. It's an ECMA standard, and Mono is a compliant implementation for Linux. There's also dotGNU (Linux), and Microsoft's shared source Rotor implementation.

Quote:
Original post by ncasebee
I would like to code for the Xbox...
Be aware that the Xbox is officially a closed system. There is a homebrew scene out there, with various tools of it own, but it is not officially sanctioned.

That said, Xbox developers do use Visual Studio (and CodeWarrior, I hear) in conjunction with the Xbox Software Development Kit (XDK), so purchasing VS.NET will not be a hindrance.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Yeah with the Xbox I was interested in Homebrew

A term that is thrown around alot, is managed and unmanaged C++, what the heck are you guys talking about.


#include
using namespace std;

int main()
{
cout << "Hello, World" << endl;
return 0;
}


Is it the same in .net? That's the way I learned it.

Share this post


Link to post
Share on other sites
Sorry Guys....Wasn't logged in.....Those previous posts were mine.

Oh yeah, the Happy o Meter Program wasn't right. So here it is again.

// Happy-o-Meter

#include <iostream>
#include <cctype>
#include <string>
#include <algorithm>
using namespace std;

int main()
{

string name = "";


//Introduction
cout << "Hello and welcome to the Happy-O-Meter. Just enter your First and Last Name." << endl;
cout << "Enter x to exit program." << endl;
cout << endl;
cout << endl;
getline(cin, name);
transform(name.begin(), name.end(), name.begin(), toupper);

//compare

while(name != "X")
{


if(name == "MARC CUTLER" || name == "MARC")
{
cout << "Woah, you are extremely happy. If any men are present, please be happy." << endl;
cout << endl;
}
else
{
cout << "You are just fine, no happiness or happiness found." << endl;
cout << endl;
}


cout << "Please enter another name for the Happy o Meter to analyze." << endl;
getline(cin, name);
transform(name.begin(), name.end(), name.begin(), toupper);
system("cls");
}


cout << "You entered X, and decided to quit the Happy o Meter. Goodbye!" << endl;
return 0;
}

///////////////////////////////////




What would be different in .net?

[Edited by - ncasebee on September 15, 2004 7:11:29 PM]

Share this post


Link to post
Share on other sites
I have no idea how to work .net. Any tutorials. So, I got File>New Project. I pick Win32 Console Project. I name is test20. It creates a new project, but it already has code.


// Test20.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}



I deleted that crap and just made this simple program.


//Hello World
#include <iostream>
using namespace std;

int main()
{
cout << "Hello, World" << endl;
return 0;
}



Of course it didn't worked when I went Build> Build Test20

What the heck is going on.

Share this post


Link to post
Share on other sites
It works. What the hell did that do? My "Happy" program works too. What does empty application do?

When that box is checked all, my C++ knowledge works perfectly. All my previous programs too. However, without that box checked, watch out. Can you explain that option to me?



Also, how do I default .net to the standard C++ stuff. After the things above, I opened the Happy-O-Meter.vcproj. It loaded my program full of crap again, and when I went to build it woulnd't build. It added stdafx.cpp, stdafx.h, resource files folder, a readme. I don't want all that stuff. Plus, then my program wouldn't run.

Found some good articles on Managed vs. Unmanaged C++. I think I'm starting to see the light however, I'm still open for suggestions and comments.

http://www.ondotnet.com/pub/a/dotnet/2003/01/13/intromcpp.html
http://www.developer.com/net/cplus/print.php/2197621



[Edited by - ncasebee on September 15, 2004 10:42:29 PM]

Share this post


Link to post
Share on other sites
Not ticking Empty Project will enable pre-compiled headers.

You pretty much put your common header stuff in stdafx.h and include that into every source file, and it compiles heaps faster.

When the precompiled header "stdafx.h" is not included errors will occur, unless ofcourse, its disabled.

You should be able to google it for more info...

Share this post


Link to post
Share on other sites
If you don't plan on taking advantage of managed code, you should probably use a non .NET compiler. Even if you compile your program into an exe, there are still .NET runtime dependices (meaning you still have to have .NET installed).

Share this post


Link to post
Share on other sites
Quote:
Original post by Onemind
If you don't plan on taking advantage of managed code, you should probably use a non .NET compiler. Even if you compile your program into an exe, there are still .NET runtime dependices (meaning you still have to have .NET installed).

A classic case of not knowing wtf you are talking about.
The ".net" compiler in question is the Visual C++ .Net compiler, which can generate un-managed code that has NO dependancies on the .net framework. The only time it will have dependancies on the .net framework is when you use MC++, which he clearly is not doing.

Share this post


Link to post
Share on other sites
Ok ok. Good good. I finally am starting to figure out this whole unmanaged vs managed C++ stuff. I am going to stick learning unmanaged because, it's the original C++. However, I am still having some trouble getting .net to leave out those damn precompiled headers. I don't want all this fluff. I want a .cpp file and a project. I don't want precompiled headers, cpp files pointing to those headers and all that stuff.

Is there an option somewhere to disable precompiled headers, or not use them. I haven't learned about them yet, and thus don't want to use them.

I liked 6.0, it wasn't as "fluffy".

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this