The ProgrammersTalk Community
Forum Register Search Today's Posts Mark Forums Read
Register

Go Back   The ProgrammersTalk Community > General Programming > C / C++


Welcome to the The ProgrammersTalk Community forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
Tags: , , , ,

Reply
 
LinkBack Thread Tools    Display Modes   
  #1 (permalink)  
Old 08-09-2007, 09:38 PM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
Programming Expert
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,111
iTrader: (0)
HelloWorld will become famous soon enoughHelloWorld will become famous soon enoughHelloWorld will become famous soon enough
Icon9 C++.NET vs. C++

Hello, I'm just wondering to what's really is the difference between these two? I just want to make sure that's my understanding about C++.NET and any other .NET languages is correct...

Is that true that C++.NET is also using .NET as the background program that runs with the application that we created using this language just like VB.NET and any other .NET languages such as C#...?

If it is true, then wouldn't that be the same with Java with its JDK? Do you guys have any preference one over the other? What's the advantages .NET's languages over JDK's?

__________________
PHP Code:
System.out.println("Hello World!"); 

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #2 (permalink)  
Old 08-10-2007, 09:03 PM
rpgfan3233 rpgfan3233 is offline
PT Staff
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 4
Join Date: Jul 2007
Posts: 118
iTrader: (0)
rpgfan3233 has a spectacular aura aboutrpgfan3233 has a spectacular aura aboutrpgfan3233 has a spectacular aura aboutrpgfan3233 has a spectacular aura aboutrpgfan3233 has a spectacular aura about
C++ is the language that is used to generated the native code, which then looks for the .NET runtime environment. The constructs vary between the .NET languages (mainly due to the way the languages themselves are designed), but you can create the same program in pretty much any of the languages. Any variation in the run times between the same program in different languages is fairly negligible with the .NET platform, but if an abnormal variation in the same basic program occurs between different languages, it is usually due to the design of the program, not the implementation of the language.

As for advantages of .NET over JDK, I know that Sun's JDK doesn't compile to native code like Microsoft's .NET implementation does. The idea is the same Linux because Mono is required on Linux, just like Windows requires the Microsoft .NET runtime. Just like implementations of C++ vary (Borland C++, GNU C++, Watcom C++, Microsoft Visual C++ (and C++.NET), etc.), so too do implementations of the .NET runtime.

There isn't a real advantage to using .NET over a JDK other than perhaps a minor speed improvement when using one or the other. After all, it depends on the implementation of .NET and the implementation of the Java runtime (e.g. Sun's Java HotSpot) as well as the implementation of the language and how it is converted to proper .NET code. Then there is the issue of your own code! There may be one way to do something in Java that would be faster using completely different code in C#, for example. The other difference is that Microsoft's .NET compilers compile in code to look for a certain version of the .NET runtime while Sun's Java compiler requires you to run it yourself (unless you use a wrapper or you compile to native code yourself).

That's my take on it, and I'm sticking to it.

__________________
"C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off."
-- Bjarne Stroustrup, creator of what is now known as C++
For more quotes by Bjarne Stroustrup, check out http://www.research.att.com/~bs/bs_faq.html#really-say-that.
Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
The Following User Says Thank You to rpgfan3233 For This Useful Post:
HelloWorld (08-12-2007)
  #3 (permalink)  
Old 08-12-2007, 10:01 PM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
Programming Expert
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,111
iTrader: (0)
HelloWorld will become famous soon enoughHelloWorld will become famous soon enoughHelloWorld will become famous soon enough
Quote:
C++ is the language that is used to generated the native code, which then looks for the .NET runtime environment.
I personally don't really understand this sentence... Could you please elaborate this more? what native code you're talking about?

__________________
PHP Code:
System.out.println("Hello World!"); 

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #4 (permalink)  
Old 08-12-2007, 10:13 PM
rpgfan3233 rpgfan3233 is offline
PT Staff
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 4
Join Date: Jul 2007
Posts: 118
iTrader: (0)
rpgfan3233 has a spectacular aura aboutrpgfan3233 has a spectacular aura aboutrpgfan3233 has a spectacular aura aboutrpgfan3233 has a spectacular aura aboutrpgfan3233 has a spectacular aura about
Quote:
Originally Posted by HelloWorld View Post
I personally don't really understand this sentence... Could you please elaborate this more? what native code you're talking about?
Native code refers to the executable format that the OS itself can understand, also known as a "binary", allowing it to tell the hardware how to process the file. When someone talks about java applications, usually it refers to the class files that are byte code (or jar files that archive the class files). You can't run java byte code directly. That's why it requires a java virtual machine. Java is compiled, but only to java byte code for the JVM to parse. With .NET, you actually get an executable file (binary).

__________________
"C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off."
-- Bjarne Stroustrup, creator of what is now known as C++
For more quotes by Bjarne Stroustrup, check out http://www.research.att.com/~bs/bs_faq.html#really-say-that.
Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
The Following User Says Thank You to rpgfan3233 For This Useful Post:
HelloWorld (08-15-2007)
  #5 (permalink)  
Old 08-14-2007, 09:59 PM
ccoonen ccoonen is offline
PT Staff
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 4
Join Date: Jun 2007
Location: Wisconsin
Posts: 308
iTrader: (0)
ccoonen is on a distinguished roadccoonen is on a distinguished roadccoonen is on a distinguished roadccoonen is on a distinguished road
C++ for .NET just uses the c++ syntax but everything has to run through the visual studio runtime files. So - essentially, you need to install their "interpreter" files to run your C++ in VS. If you do straight up C++ with a non-vs compiler, then its machine-code compliant which doesn't need to use the runtimes visual studio provides.
Reply With Quote
Reply


Thread Tools
Display Modes

   Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 12:58 PM. Powered by vBulletin
Copyright © 2000 - 2007, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO © 2007 ProgrammersTalk Sedo - Buy and Sell Domain Names and Websites project info: programmerstalk.net Statistics for project programmerstalk.net etracker® web controlling instead of log file analysis


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50