Thread: Difference Between C And C++

  1. #1
    Trying to Learn C nathanpc's Avatar
    Join Date
    Jul 2009
    Location
    Brazil
    Posts
    72

    Arrow Difference Between C And C++

    Hello,
    I'm starting to learn C or C++ and i want to know two things:
    • Difference Between C And C++
    • What Is The Best C Or C++


    Thanks,
    Nathan Paulino Campos
    Follow Me At Twitter
    Eee PC 904HD White | Windows XP Home Edition and Linux Ubuntu Hardy Herron

    Google Talk: [email protected]
    ICQ: 424738586
    AIM: nathanjava

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Too numerous to list.
    To be basic, C++ is a higher-level version of C, more modern, flexible and powerful.

    The best depends on where you want to use it, and it's also subjective because everyone has a different opinion. If it's computer software, the "best" choice I would make is C++. Same goes for games.
    For drivers you will end up stuck with C. For embedded systems, support for C++ may be scarce, so you may have to use C for this.
    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.

  3. #3
    Trying to Learn C nathanpc's Avatar
    Join Date
    Jul 2009
    Location
    Brazil
    Posts
    72
    Hello Elysia,
    Thanks for the aswear, then i'm going to buy a C++ Book to read.

    Thanks,
    Nathan Paulino Campos
    Follow Me At Twitter
    Eee PC 904HD White | Windows XP Home Edition and Linux Ubuntu Hardy Herron

    Google Talk: [email protected]
    ICQ: 424738586
    AIM: nathanjava

  4. #4
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    I took a look at your web site. It looks like you want to do windows programming, or port something to windows. (I do not read your language.) To that end, if you're interested in doing that right away, find out what you want to port is written in, and learn about it.

  5. #5
    Trying to Learn C nathanpc's Avatar
    Join Date
    Jul 2009
    Location
    Brazil
    Posts
    72
    Hello whiteflags,
    Yes but i changed my site to: Dev Python and i don't changed it here.

    Thanks,
    Nathan Paulino Campos
    Follow Me At Twitter
    Eee PC 904HD White | Windows XP Home Edition and Linux Ubuntu Hardy Herron

    Google Talk: [email protected]
    ICQ: 424738586
    AIM: nathanjava

  6. #6
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    Quote Originally Posted by nathanpc View Post
    Hello,
    I'm starting to learn C or C++ and i want to know two things:
    • Difference Between C And C++
    • What Is The Best C Or C++
    You may as well be asking which is better, Holden or Ford?
    You'll cause the same riot either way. So I'll just say learn D instead!
    Other than that, just STFW!
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  7. #7
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    Quote Originally Posted by nathanpc View Post
    • Difference Between C And C++
    Incompatibilities Between ISO C and ISO C++
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  8. #8
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Ah, but I think that isn't what nathanpc is after.
    What he/she is after is not the backwards compatibility of C++, but rather what is a considered a good C++ program vs a good C program.
    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.

  9. #9
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    Sometimes the answers people are after are deceptive and wrong.

  10. #10
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I agree, but I can't see why difference it would make to know the difference between ISO C and ISO C++.
    It seems to the OP wants to know which language to learn of C and C++, hence asking a somewhat vague question, what's best (because the OP doesn't know any better)?
    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.

  11. #11
    Registered User
    Join Date
    Jul 2009
    Posts
    5
    C was the C++ predecessor.........it has features that lend itself better to really big projects

  12. #12
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    C lends itself better for really big projects?
    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.

  13. #13
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    Quote Originally Posted by Elysia View Post
    I agree, but I can't see why difference it would make to know the difference between ISO C and ISO C++.
    It seems to the OP wants to know which language to learn of C and C++, hence asking a somewhat vague question, what's best (because the OP doesn't know any better)?
    Well you're right, he is asking a very vague question, and he got what he deserved, a very literal answer. You can only seriously answer a well thought out question.

    Quote Originally Posted by Elysia View Post
    C lends itself better for really big projects?
    Maybe you were being rhetorical. I think they have the same capacity.

  14. #14
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by whiteflags View Post
    Maybe you were being rhetorical. I think they have the same capacity.
    No, I was asking if C has features that lends itself better for bigger projects, or if it was a typo.
    If we compare C and C++, then C++ has features that lends itself from bigger projects (because C++ only adds things to C and not removes them, it would be illogical to say C has such features).
    As to which is better for any type of project, big or small, that's a different question.
    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.

Popular pages Recent additions subscribe to a feed

Tags for this Thread