Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Difference between C++.NET and Visual Studios C++?

Posted on 2004-08-16
6
Medium Priority
?
264 Views
Last Modified: 2010-04-24
What is the difference between C++ .NET and Visual Stuidos C++? I have both student version installed on my computer at home and I don't understand what the difference is. Is it just the interface is different or is there more? If my instructor asks for a .cpp and a .h file I can create them in both applicatipons correct? Would they be interchangable?

Thank you,
GM
0
Comment
Question by:morganftd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 19

Accepted Solution

by:
drichards earned 200 total points
ID: 11811899
First of all, I'd say stick with whatever compiler your instructor will be using to validate your code - it's the safest bet and you don't want to have to say things like "but I can compile it on my machine".  If the instructor is not going to compile your code, there are no significant differences to worry about.  That said...

I am assuming you mean the difference between VC6 (Visual C++ 6.0) and VC7 (Visual C++ .NET).

The biggest difference is that VC++ .NET supports managed C++ which lets you build managed (.NET) apps with C++.  There are some Microsoft extensions to the C++ language to allow this and you probably don't care about them at this point.

Another big difference is that the standards compliance of the compiler was enhanced a lot in the newer version.

If you stick to basic C++, apps should be portable back and forth.

If you use MFC, things are USUALLY portable, especially if you strictly followed rules for message map signatures as the type safety of the message map functions is one of the MFC changes that bites a lot of people.  There are a few gotchas with the new implementation of CString as well.  You don't care about this at al if you will not be using MFC.
0
 

Author Comment

by:morganftd
ID: 11813798
Thank you drichards. I asked about which one to use because he said to me "I don't care which one you use".

So basically at this point in the game it really doesn't matter which one I use until I get into MFC. :-)

0
 
LVL 19

Expert Comment

by:drichards
ID: 11813940
Yes, that's about it.  If you have a choice, definitely use the newer compiler because of standards compliance.  It's also got a much newer version of standard C++ libraries.  Together, these mean lots fewer compiler warnings.

In the old compiler, Warning Level 4 was pretty much unusable if you used C++ libraries (iostream, vector, etc.).  Now you can turn on Level 4  and set "Treat Warnings As Errors" to true and not have to wade through hundreds of warnings that weren't even in your own code.
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 

Expert Comment

by:eddstar
ID: 11822577
Hey GM,
Being a student like you ( that worked with vc6 ) and that is currently doing a summer internship working with vc++ with managed extensions, I would advise you to stick with vc6. The reason is that by being a student proffesors want you to learn the basics, which means you might have to implement you own linked list instead of using a built in. They will also want you to become familiar with new and delete. So in order to avoid problems in the future I would stick with vc6 and do everything by yourself which means don't include and libraries that do things for you.
-hope this helps,
EE
0
 
LVL 19

Expert Comment

by:drichards
ID: 11823090
>> which means you might have to implement you own linked list instead of using a built in.
>>  They will also want you to become familiar with new and delete.
>>  So in order to avoid problems in the future I would stick with vc6 and do everything by yourself
>>  which means don't include and libraries that do things for you.

There is nothing in VC7 that will prohibit you from doing this, and as I said, the C++ compiler is more standard-compliant, so you will actually be able to do better with it than with the old compiler.  The old compiler did some things that were blatantly against the standard and left out things that are part of the standard.  The newer compiler is a much better bet if you have a choice.

I think you are confusing regular C++ with managed C++.  VC7 cando either/both.  You can stick entirely with plain standard C++ if you want (and for a class using C++ certainly will).
0
 

Author Comment

by:morganftd
ID: 11825689
Thanks EE and drichards for your added comments. :-) I do understand now. I was talking with my classmates last night about compiling errors on our projects and someone said "oh I hate having to count lines". I told him in VC7 all I have to do is click on the error and it takes me right to the line (along with the line number being in the error code).

drichards that's really interesting abotu the Warning Level 4 trick also. Will have to check that out.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question