Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

C++: living in a cave

 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Prentiss,

...I've been living in a cave the last years and completely
missed out on the developments regarding C++.

In a nutshell can you tell us how the C++ landscape looks
like nowadays in comparison to 10 or more years ago?

Cheers,

Gian
 
Prentiss Knowlton
Author
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Gian,

It has been to your benefit to have been in your cave, because C++ has been in a state of considerable change until recently. In a nutshell, automatic memory management provided by "new" as offered by Java and C# is now available in C++ 2008 (also known as managed C++) through the gcnew keyword. In the meantime, the original new and delete keywords still work as they always have in native C++.

The beauty of C++ 2008 compared to other languages is that it remains upward compatible with native (or unmanaged) C++ and legacy C (going back to 1969). This is discussed in chapter 19. When the code you wish to run is unmanaged (from programs written 20 years ago), you can inform the compiler through the #pragma unmanaged directive, and it can run up to twice as fast as managed code.

Cheers,
Pren
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic