Results 1 to 15 of 15

Thread: C/C++/Turbo C

  1. #1

    Thread Starter
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    C/C++/Turbo C

    What's the difference between them all?


    Has someone helped you? Then you can Rate their helpful post.

  2. #2
    Hyperactive Member Maven's Avatar
    Join Date
    Feb 2003
    Location
    Greeneville, TN
    Posts
    322
    Well C and C++ are both languages. C++ is based upon C, basically it extends the C langague. For exmaple C didn't have oop, that was one of the extentions made with C++.

    Turbo C is an old compiler.
    Education is an admirable thing, but it is well to remember from time to time that nothing that is worth knowing can be taught. - Oscar Wilde

  3. #3

    Thread Starter
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    So the coding is all the same (sort of)?


    Has someone helped you? Then you can Rate their helpful post.

  4. #4
    Hyperactive Member Maven's Avatar
    Join Date
    Feb 2003
    Location
    Greeneville, TN
    Posts
    322
    well if you learn C++, you learn c at the same time.
    Education is an admirable thing, but it is well to remember from time to time that nothing that is worth knowing can be taught. - Oscar Wilde

  5. #5

    Thread Starter
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    And the other way around? I have a Turbo C class at uni I am thinking of taking, that's why I'm curious...


    Has someone helped you? Then you can Rate their helpful post.

  6. #6
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106
    I believe Turbo C was Borland's C development tool. The language should be roughly the same between different environments, but not always, and not completely. Pre-processor directives were wildly fluid between compilers, for instance.

    Going from C++ to C would be easy. Going from C to C++ would not be so easy. Especially when you add the Standard Template Library. C is a good place to start for C++, since the syntax would be the same. However, C++ adds huge gobs of items.

  7. #7

    Thread Starter
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    OK. Thanks for all the info


    Has someone helped you? Then you can Rate their helpful post.

  8. #8
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Others (including me) say that learning C in order to prepare for C++ is a bad thing.

    BTW, if you're not an IE-user, go here for C++:
    http://stud3.tuwien.ac.at/~e0226430/...al/index.xhtml
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  9. #9

    Thread Starter
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    Originally posted by CornedBee
    Others (including me) say that learning C in order to prepare for C++ is a bad thing.
    Thanks for the link! I'll definatelly look at it

    But, why is it bad?


    Has someone helped you? Then you can Rate their helpful post.

  10. #10
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    1) It's harder than necessary. C++ has a standard library that greatly assists programmers get over the hard parts of C like string handling. By learning C before C++, you give up this advantage.

    2) C is procedural, C++ is object-oriented. The hardest part (IMHO) about learning a language is not its syntax, it's the mindset. The second hardest part isn't the syntax either, it's the default library and built-in functions. C++ has a different mindset and a different default library than C (although it supports both in their C versions), so learning C before C++ means that you learn a syntax and the general programming basics: variables, loops, branches. That's only a small part, and whatever else you put into learning C is wasted unless you plan to use C.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  11. #11

    Thread Starter
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    Generally what is used more? C++? Would you suggest C++ over C in term of flexibility and capabilities?


    Has someone helped you? Then you can Rate their helpful post.

  12. #12
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    I don't know exactly, but overall, I believe C++ is used more. C is used a lot for libraries that do things, a lot for small programs and almost exclusively for hardware-near programming.
    C++ is used for larger applications, to write programs that make use of the libraries.

    The capabilities are the same. There's no effect in C you can't achieve in C++ and vice versa. It will, however, be easier in C++ most of the time and equal in the few exceptions where C would be better than C++, because C++ is still a superset of C.
    I don't know about flexibility. I have a hard time making anything real out of this term.

    The advantage that C++ really gives you is, I believe, to do more with less code or at least clearer code, while not compromising on speed, at least not as much as most other languages (like Java) do.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  13. #13

    Thread Starter
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    OK, thanks for the clarification CB


    Has someone helped you? Then you can Rate their helpful post.

  14. #14
    Hyperactive Member Maven's Avatar
    Join Date
    Feb 2003
    Location
    Greeneville, TN
    Posts
    322
    Originally posted by manavo11
    Generally what is used more? C++? Would you suggest C++ over C in term of flexibility and capabilities?
    Like I said above, when you learn C++ you will also learn C.

    C++ is used more because of OOP and templates. It has many different tools that you can use to solve various problems with. The hard part of this langauge is knowing what tools to use when. Basically you can write windows programs with the API, MFC, .net, WTL, or even QT3 depending upon your needs. Pretty much this langauge takes a lot of time to learn. You won't create windows programs for a long time just because the langauge is so complex and you have to learn it first.

    C is used mostly for programs or librarys that need maximum speed. The windows API for example was written in C.
    Last edited by Maven; May 9th, 2004 at 05:29 PM.
    Education is an admirable thing, but it is well to remember from time to time that nothing that is worth knowing can be taught. - Oscar Wilde

  15. #15

    Thread Starter
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171


    Has someone helped you? Then you can Rate their helpful post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width