Page 1 of 7 123 ... LastLast
Results 1 to 10 of 70

Thread: C++ or C?

  1. #1
    Join Date
    Feb 2007
    Beans
    13

    C++ or C?

    hey

    which language is better c++ or c? and please give reasons
    i am planning on learning one of them languages

    thanks very much people.

  2. #2
    Join Date
    Sep 2005
    Location
    Earth, Europe
    Beans
    175
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: C++ or C?

    C is kind of Low-level, C++ is to. But C++ is more complex, and its faster than C when it is compiled.
    So, I would go for C++, because when you know C++, you sure gonna know how to program in C.

    I would go for something easy first, like python. ( Its good to combine some python and C++.. Python for simple big stuff, and C++ for more detailed main stuff with details etc ).. you are gonna need Python in the future

    Python tutorial: http://www.ibiblio.org/obp/thinkCSpy/

    C++ tutorial: http://www.cplusplus.com/doc/tutorial/

    Learn Python first, then C++ and last.. C
    Remember to read my blog: click here !

    "This is the greatest and best signature in the world"

  3. #3
    Join Date
    Feb 2007
    Beans
    13

    Re: C++ or C?

    well i know php,html pretty good made a few good sites with it. i think i'll go straight to c++

    why would i learn c last? lol if c++ is better?

    thanks again

  4. #4
    Join Date
    Sep 2005
    Location
    Earth, Europe
    Beans
    175
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: C++ or C?

    C++ is more complex, and it has better memory managment +its faster

    EDIT: Oh, and its OO( Object Oriented )
    Remember to read my blog: click here !

    "This is the greatest and best signature in the world"

  5. #5
    Join Date
    Apr 2006
    Location
    in the dark
    Beans
    1,513

    Re: C++ or C?

    From what Ive experienced c is more for embedded programming, like microprocessors, the linux kernel etc. Where c++ being object oriented is better for desktop applications and the like.

    So I guess you have to ask yourself, are you going to be developing an operating system or the next Openoffice.org?
    Imagination is more important than knowledge

  6. #6
    Join Date
    Jan 2007
    Location
    the third world
    Beans
    Hidden!

    Re: C++ or C?

    Quote Originally Posted by drfalkor View Post
    C++ is more complex, and it has better memory managment +its faster
    It's only faster in very few cases.

    Quote Originally Posted by drfalkor View Post
    EDIT: Oh, and its OO( Object Oriented )
    Which counts for nothing.
    Not to mention, the OO implementation isn't exactly brilliant on C++.
    For decent OO, stick to stuff like Ruby.
    IESVS FELLAT IN INFERNVM

  7. #7
    Join Date
    Feb 2007
    Beans
    13

    Re: C++ or C?

    c++ it is then

    thanks very much. any links for info about the STL? and programming for linux in c++?

    thanks again.

  8. #8
    Join Date
    Jun 2006
    Beans
    943

    Re: C++ or C?

    C++ is more complex, and it has better memory managment +its faster
    That depends on the C/ C++ compiler. Comparing GCC and G++ indicates that there is very little difference between the two.

    Look at http://shootout.alioth.debian.org/gp...=gcc&lang2=gpp.
    Last edited by Lster; February 27th, 2007 at 01:09 PM.

  9. #9
    Join Date
    Oct 2006
    Beans
    232

    Re: C++ or C?

    C++ is basically C with classes. You can do any C command in c++. You are less susceptible to buffer overflows in c++ and passinig by reference is nicer and and and and....
    C should have been retired long ago.

  10. #10
    Join Date
    Jul 2005
    Beans
    1,535
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: C++ or C?

    Quote Originally Posted by g3k0 View Post
    C++ is basically C with classes. You can do any C command in c++.
    Not really true. For example, here is a line in C that won't compile in C++:
    Code:
    int class;
    C++ is now also a lot more than C with classes (e.g. generics)

    You are less susceptible to buffer overflows in c++
    Not true.

    and passinig by reference is nicer
    While I personally agree that it is nicer, this is not a globally true statement.

    C should have been retired long ago.
    Why? Use C when appropriate and C++ when appropriate.

    As for the OP's question, I would suggest C++ if only for the STL.
    When I invented the Web, I didn't have to ask anyone's permission.
    ~Tim Berners-Lee on Net Neutrality
    -------------------------------------
    Visit the Ubuntu Programming IRC-channel at #ubuntu-programming (chat.freenode.net).

Page 1 of 7 123 ... LastLast

Bookmarks

Posting Permissions

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