Advertisement

C++ or C#

Started by March 22, 2003 09:42 PM
3 comments, last by Trombonastic 21 years, 7 months ago
What''s the difference between the two, I''m so confused on this subject, and many others for that matter.
C++ and C# are two separate languages (just like Java, or C, or Pascal, or Basic, or ...)

C++ is traditionally compiled straight to assembly code, and puts a lot of memory management burden on the programmer, leading to programs that CAN be very efficient if the programmer is good, but CAN also be very crashy, if he isn''t.

C# is a separate language, which is typically compiled to byte-code which is interpreted at runtime, much like a Java program. It doesn''t put as much memory management burden on the programmer, often leading to fewer bugs, but at the same time not letting you optimize as much as in C++.

Also, the only really good implementation of C# currently available is the one in VS .NET available from Microsoft, and only runs on Windows. C++ compiles and runs everywhere (more or less, with modification).
Advertisement
quote: Original post by Anonymous Poster
C# is a separate language, which is typically compiled to byte-code which is interpreted at runtime, much like a Java program.

It is never interpreted. It is compiled to native code just before it is run - Just In Time-compilation. The same goes for modern implementations of Java.




"If there is a God, he is a malign thug."
-- Mark Twain
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
I see no difference. Some code structure is changed (bool to boolean, and so on), but for the most part they are similar. I do agree with the other replies. It can be faster.

A Confused N00b
LevelguyCurrent Project: Upgrade to Visual C++.NET25%
quote: Original post by homersimpson645
Some code structure is changed (bool to boolean, and so on)

Both C++ and C# use the keyword bool to indicate a boolean datatype.




"If there is a God, he is a malign thug."
-- Mark Twain
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]

This topic is closed to new replies.

Advertisement