• Advertisement
Sign in to follow this  

what is managed c++?

This topic is 4728 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

can someone tell me, whats exactly the difference between c++ and managed c++? what does a "managed language" means? i search on the net, but it didnt stay clear to me.......... thanks in advance......

Share this post


Link to post
Share on other sites
Advertisement
managed c++ uses the .net framework, basically its a collection of namespaces which are a collection of classes, that are ment to make things easier for you. but to run the program you need the .net framework installed.

Share this post


Link to post
Share on other sites
A "managed" language means that objects are automatically deleted for you when you don't need them (has a garbage collector built in). All the classes in the .NET framework don't need to have delete() called on them even if they were allocated with new().

Share this post


Link to post
Share on other sites
Quote:
Original post by jikbar
A "managed" language means that objects are automatically deleted for you when you don't need them (has a garbage collector built in). All the classes in the .NET framework don't need to have delete() called on them even if they were allocated with new().
The first part isn't necessarily true with managed C++. Only managed classes (classes prefixed with __gc or ref in C++/CLI) are garbage-collected. Regular objects still need to be deleted as far as I know.

The way I think about it is that managed C++ is an extension of C++, so most C++ should compile as managed C++ fine, and if they choose not to use .NET, they'd be functionally equivalent to non-managed C++.

Oh and I should probably explain C++/CLI. Basically managed C++'s syntax was terrible enough that Microsoft decided to redo it for .NET 2.0, which has resulted in C++/CLI. Here's a short introduction to C++/CLI. The syntax is a lot cleaner, so if you'll be doing a lot of C++ and .NET work you might want to wait for .NET 2.0.

Share this post


Link to post
Share on other sites
thanks a lot for your answer, and the good links, now it is clearer....

P.S. when does .net 2.0 comes out?

Share this post


Link to post
Share on other sites
I think Visual Studio 2005 and .NET 2.0 are both set to be released this summer. The second VS.NET 2005 beta is coming in April last I heard. I've ported code from MC++ to C++/CLI before and it isn't too bad, just very tedious, so don't let the release date stop you if you have something that'd work well now with MC++.

Share this post


Link to post
Share on other sites
Quote:
Original post by mutex
I think Visual Studio 2005 and .NET 2.0 are both set to be released this summer. The second VS.NET 2005 beta is coming in April last I heard. I've ported code from MC++ to C++/CLI before and it isn't too bad, just very tedious, so don't let the release date stop you if you have something that'd work well now with MC++.



So is it possible that code written in VS 2003 won't be compatible with code written in VS 2005?

Share this post


Link to post
Share on other sites
Quote:
Original post by ChiefArmstrong
So is it possible that code written in VS 2003 won't be compatible with code written in VS 2005?
I'm not sure about the other languages. There are changes definitely, but for the most part I believe they'll be compatible. Most of the changes I see are in the class libraries, and language changes are additions as far as I can tell. The MC++ syntax will be available via a compiler switch.

Share this post


Link to post
Share on other sites
Additions are fine, I was wondering if some of the syntax of say VB and C# were changing.

Also, is the C++ language in VS 2005 more ANSI compliant? I know that VS 2003 was getting a lot closer to the compliance, just wondering if 2005 will make it adhere tighter to the standard.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement