Go Back  Xtreme Visual Basic Talk > General Discussion > Tech Discussions > C# / C++ ? is there even a difference?


Reply
 
Thread Tools Display Modes
  #1  
Old 02-13-2005, 01:01 PM
XxVegoxX XxVegoxX is offline
Centurion
 
Join Date: Feb 2004
Posts: 139
Default C# / C++ ? is there even a difference?


i was just wondering about this since i got this book from a m8 called BaseCourse C#, however when i read trough it its exactly the same as the C++ Tutorials u can find on cpprogramming and tutorial websites like those.
both start out with console applications.

Could some1 explain the differences advantage/dissadvantage's?

Thanks!
-Jeroen
Reply With Quote
  #2  
Old 02-13-2005, 04:04 PM
Iceplug's Avatar
Iceplug Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: California, USA
Posts: 16,583
Default

The really big thing that distinguishes C# from C++ is that it does not require pointers to operate. From what I hear this is both an advantage and a disadvantage.
Strings in C# are handled just as they are in VB.NET, you declare a string rather than an array of characters or however they are declared nowadays in C++.
Now, you do have the option of using pointers in C#, but mind you, that is unsafe, as noted by Microsoft.
Also, from what I hear, C# is much more strict on what it allows than C++, but I'm not really a C++ user, so this is all that I can say is the difference between the two.
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
  #3  
Old 02-13-2005, 04:50 PM
XxVegoxX XxVegoxX is offline
Centurion
 
Join Date: Feb 2004
Posts: 139
Default

hm ok thanks maybe someone could state a well motivated oppinion on wich would be the 'better' programming language ( globally spoken , im sure each has its advantages over the other )
Reply With Quote
  #4  
Old 02-13-2005, 10:27 PM
Toveling's Avatar
Toveling Toveling is offline
Contributor
 
Join Date: Oct 2003
Posts: 417
Default

Better for what? It really does depend what your doing, but C# is gonna be a lot nicer to you in that it's managed. C++ would be faster only if you really figure out how it works and get good with it.
Reply With Quote
  #5  
Old 02-14-2005, 06:37 AM
John's Avatar
John John is offline
Bit Flipper
 
Join Date: Feb 2002
Location: The Inner Loop
Posts: 5,550
Default

It really depends on what compiler you are using. If you are using Visual C++ then the biggest difference is that C++ can make stand alone programs that do not target the .NET framework whereas C# is .NET only.

I don't really see how anyone can say one is better than the other without giving you a bias opinion. They are both good in their own way.
__________________
Subclassing|Magnetic Forms|Operator Overloading (VB2K5)|QuickSnip.NET

"These Patriot playoff wins are like Ray Charles songs, Nantucket sunsets, and hot fudge sundaes. Each one is better than the last." - Dan Shaughnessy
Reply With Quote
  #6  
Old 02-14-2005, 07:58 AM
reboot's Avatar
reboot reboot is offline
Keeper of foo

Retired Moderator
* Guru *
 
Join Date: Nov 2001
Location: Graceland
Posts: 15,612
Default

Aside from syntax, c# and c++ are very different.
__________________
~ Quod non mortiferum, fortiorem me facit ~

Avatar by lebb
Reply With Quote
  #7  
Old 02-14-2005, 10:29 AM
Sebastian Mares's Avatar
Sebastian Mares Sebastian Mares is offline
Contributor
 
Join Date: Jun 2002
Location: Germany
Posts: 710
Default

Another thing is that unlike C++ .NET and VB .NET, C# was designed to use all of .NET features. It incorporates the power of C++, the ease of use of VB and the portability of Java.
Reply With Quote
  #8  
Old 02-14-2005, 06:12 PM
michael_hk's Avatar
michael_hk michael_hk is offline
Contributor
 
Join Date: Nov 2003
Location: Hong Kong
Posts: 690
Default

Quote:
Originally Posted by Sebastian Mares
the power of C++
C# is at a much higher level than C++, need API to do low level stuff.


Quote:
Originally Posted by Sebastian Mares
the ease of use of VB
Agree.


Quote:
Originally Posted by Sebastian Mares
the portability of Java
umm....I don't think Java is portable.
Reply With Quote
  #9  
Old 02-14-2005, 06:32 PM
elnerdo's Avatar
elnerdo elnerdo is offline
Contributor
 
Join Date: Jul 2004
Location: Northern New Jersey
Posts: 490
Default

Sure it is, java runs just as well on a mac as it does on a pc ( at least i think )
__________________
nerds unite!
Reply With Quote
  #10  
Old 02-14-2005, 06:51 PM
OnErr0r's Avatar
OnErr0r OnErr0r is offline
Obsessive OPtimizer

Administrator
* Guru *
 
Join Date: Jun 2002
Location: Debug Window
Posts: 13,685
Default

Let me clear up some misconceptions:

C# does not leverage all of the .net features. For instance, it lacks assembly level globals and vararg for arguments, among other things.

MC++ does not require you use any API at all.

Java is a portable language, assuming you have the java runtimes installed. But, I wouldn't say it runs "well", it has to be one of the most sluggish GUIs around.
__________________
Quis custodiet ipsos custodues.
Reply With Quote
  #11  
Old 02-14-2005, 11:24 PM
michael_hk's Avatar
michael_hk michael_hk is offline
Contributor
 
Join Date: Nov 2003
Location: Hong Kong
Posts: 690
Default

Quote:
Originally Posted by elnerdo
Sure it is, java runs just as well on a mac as it does on a pc ( at least i think )
I daren't expect a Java program to look and behave in the same way on different platforms.
Reply With Quote
  #12  
Old 02-16-2005, 02:28 PM
XxVegoxX XxVegoxX is offline
Centurion
 
Join Date: Feb 2004
Posts: 139
Default

ok some nice replys, i've been doing vb for a small year now ( self study only ) . and i'dlike to start on C++/C# , wich would you guys recommend?
Reply With Quote
  #13  
Old 02-16-2005, 02:35 PM
John's Avatar
John John is offline
Bit Flipper
 
Join Date: Feb 2002
Location: The Inner Loop
Posts: 5,550
Default

Since you have some experience with VB then why not use VB.NET? If your answer is that you don't want to learn .NET or have the overhead of the .NET framework then you will not want to use C# either since it is .NET only. C++ can do programs for .NET as well as stand alone windows programs/dlls etc.

Personally I would go with VB.NET or C# since they seem to be in high demand employment wise. VB.NET would probably be better for you since you have the familiarity with the syntax on your side.

All this being said, it is difficult to give an unbiased opinion and it will also depend greatly on the types of applications you are looking to develop.
__________________
Subclassing|Magnetic Forms|Operator Overloading (VB2K5)|QuickSnip.NET

"These Patriot playoff wins are like Ray Charles songs, Nantucket sunsets, and hot fudge sundaes. Each one is better than the last." - Dan Shaughnessy
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->