C++ vs C#

TreasonX

Newcomer
Joined
Apr 16, 2003
Messages
6
I have just finished 2 courses on C++, and I am trying to decide if I should jump right in and learn the Microsoft Foundation Classes or should I focus on C# for windows development? I did very well with C++ which covered procedural programming and control structures in the first course, and in the second it moved on to OOP (classes, inheritance, polymorphism, virtual functions, etc). I will be learning windows development on my own so I am torn on which language to go with. I like the power of C++ and I have a deeper understanding of it, but C# does most of the dirty work for you and makes programming in windows a bit easier without giving up too much power.

If you a seasoned windows programmer please post your thoughts on my choice.

Thanks

James
 
I don't know much about 'real' C++, but I'm pretty good with MC++ (Managed C++). If you have Visual Studio .NET 2003, it has a Windows Forms designer for Managed C++. I don't know, but I'd say that MC++ is maybe more powerful than C#, both of which allow for unmanaged code. Personally, I'd use MC++ instead of MFC and C#.
 
IMO C++ and .NET just don't mix. Using Managed C++ is just a mess IMO, and you're much better off using C#.

As far as C++ w/ MFC vs .NET when it comes to applications, I'd probably say it's much easier to build the app in .NET, not to mention it'd take significantly less time. Oh, and since MFC bloats your program and adds overhead, you're more then likely looking at about the same performance with .NET and near to none bloating (.NET apps are really small in size).

If you're looking for raw performance, then you're going to need to ditch MFC, and go pure C using API calls. Don't forget to clear your calendar for the next year...
 
I'm inclined to agree with wyrd. I haven't had the opportunity to use MC++ in vs.net 2003 yet (supposedly it has vastly improved), but I have a feeling you're still better off with C#, as was certainly the case with vs.net 2002.

If your choice is between .NET and MFC, the only reason to go with MFC would be code reuse of old MFC apps or components you've written. Personally, I find MFC almost as disgusting as VB6. ;)

Think hard before taking the C/C++/ASM/Win32 API route. Not a lot of applications need to be this efficient, and if you need to implement any high-level programming concepts, such as an assured level of security or gargabe collection, you're much better off with .NET. The only place I'd drop back to C would be CPU-intense apps: games and back-end "thinker" apps, like Folding@Home.

.steve
 
Back
Top