Results 1 to 8 of 8

Thread: Difference between C and C++

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2000
    Posts
    100

    Cool Difference between C and C++

    What is the difference? Which is good for what? Which are the best compilers for both?

    thanx in advance

  2. #2
    Massive difference: C++ is object-oriented (you can create classes) and C is not. IMHO, C is really confusing compared to C++, so I'd learn C++ instead of C.

    Borland makes a free compiler for both at their web site, http://www.borland.com . But it is console-only (i.e., not an IDE).

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2000
    Posts
    100

    Then wat is best for......

    Which is best for games that deal with 3d graphics such as simple rpg or ones with moving models from 3d studio max etc?

    Which will be able to create programs, applications best?

    Which is windows independant? able to be linux as well?

  4. #4
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    They are both pretty much platform-independent (you'll have to recompile of course) as long as you don't use any Windows API calls or other OS-specific stuff.
    Alcohol & calculus don't mix.
    Never drink & derive.

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I use C++ normally, but if someone asked for C code I'd give it to them The program files generated by C compilers is a lot smaller than the equivalent C++ source, and despite being a bit more confusing, C is actually more logical. C++ is full of bits bolted on in all places and can mess beginners up.

    I use C++ for most programs so that I can use the STL templates(what a lifesaver!) and also, I wrote a Window class so I don't have to mess with the API too much.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  6. #6
    Hyperactive Member Radames's Avatar
    Join Date
    Feb 2001
    Location
    Tech Tropics
    Posts
    360
    For cross-platform compatabiliy use Java.
    Top Tip: You can make friends and impress the opposite sex at geeky cocktail parties by saying "DB" instead of database. - Karl Moore

  7. #7
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    Parksie, 2 things...

    1. What's the STL? How does it help?
    2. What's in the window class? Can I see
    Alcohol & calculus don't mix.
    Never drink & derive.

  8. #8
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Radames - but that defeats the object of using C++

    Wynd - the STL has now been incorporated into the Standard C++ Library but it's a fairly distinct part so by convention everyone calls it the Standard Template Library still (that's what it used to be before the committee put it in the standard). www.sgi.com/tech/stl is the place to go

    As for my window class, you could have a look but it does all the message handling as well so it's complicated with lots of messing around with static member functions (Plus the DLL its in has Unicode support so there's some trickery to make all that compile)
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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