Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C++ or C++.NET

Status
Not open for further replies.

Nutthick

MIS
Jan 14, 2004
126
GB
I'm new to C++, coming from VB, and I've been working through a book on C++.NET. The two terminologies of standard C++ and .NET have got me confused. Should I forget about libraries lke math.h completely and start using the Math namespace? I ultimately want to produce Windows apps, so my book says use math.h, but then it mostly goes on about namespaces. Could someone clear up for me which method I should be using (and what's C# all about)?

Thanks
 
Namespaces are part of C++.
You should include <cmath> and then use the std namespace.
C# is a version of C++ that looks more like Java.
 
You should decide between C++ and C#, in my opinion. They are both programming languages, but are very different. There is also the .NET add on to the C++ language (Managed C++). I'm not sure how common the Managed C++ is (C++.NET), but if you are learning a new language I would suspect you should just go all the way to C# instead if you want the features of .NET. Since you want to do windows apps that would probably be the best option, learn and use C#.

If you go ahead and use C++, then you need to decide if you will use managed or unmanaged C++. Again, from what I've seen managed C++ is not as common. If you used managed C++, then you can go ahead and use the Math namespace or whatever that is. If you want unmanaged C++, which is governed by standard C++ and can be ported to other platforms, use the functions in <cmath> (the C++ version of <math.h>). However, if you want to build Windows apps, either way you will have to use code that is non-portable to create a windows GUI.
 
Thanks for the advice. Do you think this means that C# is going to superceed C++.NET? From what I've read both of them are designed for interfacing better with the internet. I just don't want to waste my time on C++.NET, when C# is what Microsoft have in their masterplan. My first two application I have in mind, both require direct access to the internet from the application.
 
C++ is more powerful than C# in some areas, but more difficult to learn. Microsoft's master plan is that it doesn't matter what language you use to develop .Net applications - the choice of language should just be a user preference.

I really like C# but it's no use outside of .Net. If you don't want to be tied to Microsoft and .Net then learn C++.

Nelviticus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top