Thread: C , C++ , C# differences.

  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    6

    Arrow C , C++ , C# differences.

    Hello guys. I am new in this forum and I would like to know the differences about the C <-> C++ <-> C# languages. Thank you....

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Why do you want to know the differences? Are you trying to decide which language to learn?

    There are a lot of differences. C is a structured language, C++ and C# are object-oriented. C and C++ are compiled languages where you sometimes have to deal with a lot of low-level memory management details yourself, whereas C# has a garbage collector that cleans up after you. C# is more Microsoft's thing, and it probably has more useful libraries since it is a more modern language. I imagine that C and C++ are used more widely, though.

    You've asked a very broad question and so that's all you're going to get in terms of answers . . . .
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    This is bound to turn into a huge debate, and is probably suited for the general forum, not one specific language forum.


    Quzah.
    Hope is the first step on the road to disappointment.

  4. #4
    Registered User
    Join Date
    Jul 2010
    Posts
    6
    You are right, it is general question...

    The year that pasted i have learn C...i made an efford. And from this September im going to C++...So by the end of 2011 i will know C & C++ but i have no idea about C#.
    What is it and if it is usefull the "common" people and not the ones that work at microsoft. Can someone inform me?

  5. #5
    Amateur Programmer
    Join Date
    Nov 2003
    Posts
    11
    Quote Originally Posted by mystic View Post
    You are right, it is general question...

    The year that pasted i have learn C...i made an efford. And from this September im going to C++...So by the end of 2011 i will know C & C++ but i have no idea about C#.
    What is it and if it is usefull the "common" people and not the ones that work at microsoft. Can someone inform me?
    I know several people who all work for different companies that use C#. C# is essentially Java with some modifications/fixes by Microsoft, but for Microsoft's .NET community. If you use Linux, it can work on Mono, but there are patent issues that may be of concern.

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Moved - and try pasting your topic title into google.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  7. #7
    Registered User
    Join Date
    Jul 2010
    Posts
    6
    Ok Salem. I just wast your opinions...your thoughts...thanks!

  8. #8
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    So what do you think all the hits on google are - opinion, or solid facts ?

    There's no shortage of "opinion" on the differences between x and y. There's even a bunch of similar threads already on this board - did you search for them?

    You might think your question is new, but it's just another "oh no, not another x vs. y" thread to some of us.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  9. #9
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    A better idea might be to ask for advice regarding what you want to do. Do you want to program games? Desktop applications? Web stuff?
    If you tell us what you want, you may get a more concrete answer as to what language might be best suited for the task.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #10
    Registered User
    Join Date
    Jul 2010
    Posts
    6

    Arrow

    Basiclly, i know some things in C programming only. Next year i' ll expand my knowlenge in C++. I really don' t know which one to choose...i like gaming but one the other hand i' ll love web programing(webpages etc.)...

  11. #11
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    You should focus on "how to program" (which will last a lifetime), rather than any particular language or technology (which might last only a few years).

    Once you get past the average student homework, there is so much to do which has nothing to do with where the braces go, or whether you need a ; at this point in the code.

    You'll learn many languages in your career. After 2 or 3, they all start to look pretty similar (when you have a solid background on the fundamentals).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  12. #12
    Registered User
    Join Date
    Nov 2009
    Posts
    111
    An example of one of the differerences, or different areas, of C/C++ and C#:

    I work for an anti-malware company. That means creating virus scanner engine(s) and other things that work at a very low level of the system. The natural choice here is C, or C++, because you're on more or less on the lowest level for any "normal" programming (assembly coding is also sometimes necessary, combined with C). Also, with things like virus scanners the resource use gets very important.

    I've several friends who works as consultants, creating mostly business software for the Windows platform. The natural choice there (apart from maybe Java), since it's all exclusively Windows and the .NET platform, is to use C# in .NET. It's about as portable as a grand piano, of course, but since it will never be ported to any other system(s) it's perfectly acceptable. For "lower level" system programming like scanner engines etc., I don't even think it's possible to use .NET. And if it is, it would die before it got started due to overhead, I think.

  13. #13
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Quote Originally Posted by cnewbie1 View Post
    An example of one of the differerences, or different areas, of C/C++ and C#:
    For "lower level" system programming like scanner engines etc., I don't even think it's possible to use .NET. And if it is, it would die before it got started due to overhead, I think.
    I just read about 2 months back about embedded .net framework; so, some things are using .net. I would guess only very powerful embedded devices, maybe cell phones like items.


    Tim S.

  14. #14
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    0.0001% of the market, maybe? You'll only likely see it on a few Microsoft devices.
    And it will probably be... yes, you guessed it. Slow.
    That framework is not a good idea for embedded devices.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  15. #15
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    That framework is not a good idea for embedded devices.
    Indeed. I keep telling people this and they just won't listen.

    For "lower level" system programming like scanner engines etc., I don't even think it's possible to use .NET. And if it is, it would die before it got started due to overhead, I think.
    You can use it if you interface with the hardware in C++ and write the bridge between the two in C++/CLI.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. differences between POSIX and EL/IX
    By KIBO in forum Linux Programming
    Replies: 1
    Last Post: 05-11-2010, 06:34 AM
  2. stdio differences windows vs linux
    By keira in forum C Programming
    Replies: 6
    Last Post: 09-14-2008, 04:42 PM
  3. differences between struct and typedef struct
    By stanlvw in forum C Programming
    Replies: 1
    Last Post: 07-22-2008, 03:28 PM
  4. Differences between C and C++
    By blankstare77 in forum C++ Programming
    Replies: 10
    Last Post: 07-25-2005, 09:03 PM
  5. differences between images
    By ^DJ_Link^ in forum C Programming
    Replies: 2
    Last Post: 02-21-2005, 08:03 AM