aspose file tools*
The moose likes C / C++ and the fly likes Plain old C++ vs C++.NET Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » C / C++
Bookmark "Plain old C++ vs C++.NET" Watch "Plain old C++ vs C++.NET" New topic
Author

Plain old C++ vs C++.NET

Riaan Nel
Ranch Hand

Joined: Apr 23, 2009
Posts: 157

Hi Prentiss

In the same vein as Gian's question in another thread on this forum - How does plain old C++ (before .NET) compare to C++.NET? Has the .NET framework had a generally positive effect on C++ in terms of things such as execution speed and ease of use? I played around with C++ a couple of years ago, and I'm interested in taking it up again.

When taking (hobby) game programming as an example, I assume that C++.NET will be better suited to the task, as I'm guessing that it has a bunch of useful graphic libraries. On the other hand, when writing applications in which speed is absolutely crucial, will plain old C++ be better? I'm not intimately familiar with .NET, but since it's a Microsoft framework, I'm guessing that C++.NET is a no-no when applications have to be platform independent?

Cheers,
Riaan

Edit: Just for interest's sake; does your book give preference to either C++ or C++.NET?


"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." - George Bernard Shaw
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36514
    
  16
I can answer some of those questions for you:
C++ 2008 is a .NET language, which adds automatic garbage collection (and a keyword, gcnew and an operator ^ to go with it). It works on a VM, and therefore appears not to have memory locations or pointers. As you suggest, there is a rich built-in library of graphics and windowing classes. It si usual to program C++2008 with Visual Studio, rather than the text editors you can use for C++.

The book is specifically about the .NET version.
Vyas Sanzgiri
Ranch Hand

Joined: Jun 16, 2007
Posts: 686

And you need a .NET license for it? and cannot use any other editors or compilers?


===Vyas Sanzgiri===
My Blog
Prentiss Knowlton
Author
Greenhorn

Joined: Dec 18, 2009
Posts: 7
Greetings, Riaan --

As I mentioned in my reply to Gian, C++ 2008 greatly closes the gap that previously existed between C++ and C# or C++ and Java. Because C++ 2008 operates within the .NET framework, it's much easier to create multi-lingual applications, a common underlying intermediate target language of all language compilers that runs on the same virtual machine (much like the Java virtual machine). The downside of this is slower execution time and the upside is automatic memory management and more bullet-proof code owing to powerful debugging and troubleshooting tools.

C++ overcomes the slower execution time when the programmer is willing to let portions of his or her program to be compiled as plain old C++ (native C++ or legacy C) unmanaged code through use of the #pragma unmanaged directive discussed in chapter 19.

Though C++ .NET is currently Windows-centric, I expect that your no-no considerations regarding other platforms will soon be obviated.

The book gives preference to C++ .NET over native C++, as plain old C and C++ information is already readily available in Kernighan and Ritchie's "The C Programming Language" and Stroustrup's "The C++ Programming Language." I was pleased to find that the complete text of both of these books is available online free in PDF format (by consulting the all-knowing Google). For this reason, all the space is devoted to what is new and significant in C++ .NET without spending space describing what is already well known and readily available from other books and sources.

Cheers,
Pren

Riaan Nel wrote:Hi Prentiss

In the same vein as Gian's question in another thread on this forum - How does plain old C++ (before .NET) compare to C++.NET? Has the .NET framework had a generally positive effect on C++ in terms of things such as execution speed and ease of use? I played around with C++ a couple of years ago, and I'm interested in taking it up again.

When taking (hobby) game programming as an example, I assume that C++.NET will be better suited to the task, as I'm guessing that it has a bunch of useful graphic libraries. On the other hand, when writing applications in which speed is absolutely crucial, will plain old C++ be better? I'm not intimately familiar with .NET, but since it's a Microsoft framework, I'm guessing that C++.NET is a no-no when applications have to be platform independent?

Cheers,
Riaan

Edit: Just for interest's sake; does your book give preference to either C++ or C++.NET?


Prentiss Knowlton

People don't care how much you know until they know how much you care -- Cavett Robert
Riaan Nel
Ranch Hand

Joined: Apr 23, 2009
Posts: 157

Prentiss Knowlton wrote:Greetings, Riaan --

As I mentioned in my reply to Gian, C++ 2008 greatly closes the gap that previously existed between C++ and C# or C++ and Java. Because C++ 2008 operates within the .NET framework, it's much easier to create multi-lingual applications, a common underlying intermediate target language of all language compilers that runs on the same virtual machine (much like the Java virtual machine). The downside of this is slower execution time and the upside is automatic memory management and more bullet-proof code owing to powerful debugging and troubleshooting tools.

C++ overcomes the slower execution time when the programmer is willing to let portions of his or her program to be compiled as plain old C++ (native C++ or legacy C) unmanaged code through use of the #pragma unmanaged directive discussed in chapter 19.

Though C++ .NET is currently Windows-centric, I expect that your no-no considerations regarding other platforms will soon be obviated.

The book gives preference to C++ .NET over native C++, as plain old C and C++ information is already readily available in Kernighan and Ritchie's "The C Programming Language" and Stroustrup's "The C++ Programming Language." I was pleased to find that the complete text of both of these books is available online free in PDF format (by consulting the all-knowing Google). For this reason, all the space is devoted to what is new and significant in C++ .NET without spending space describing what is already well known and readily available from other books and sources.

Cheers,
Pren


Hi Prentiss

Thank you for the reply; it answered a lot of my questions. Also, thanks for the references to the free C++ books. After reading your reply, it makes complete sense that your book gives preference to C++.NET as opposed to native C++; in this industry, one has to keep up with the times.

Campbell, thank you to you too.

Cheers,
Riaan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Plain old C++ vs C++.NET
 
Similar Threads
What are the uses and applications of Java?
Java vs .Net framework
C++ vs C#
Servlets vs Struts
Why and How Java is better than C#?