Thread: Why should I choose for c++ n not 4 c?

  1. #1
    Registered User
    Join Date
    Dec 2011
    Location
    Eindhoven, Noord-Brabant, Netherlands
    Posts
    54

    Why should I choose for c++ n not 4 c?

    A lotta ppl told me I should choose c++ instead of c, but then again, i heard c can do anything c++ can. Y should i choose c++ instead of c? Can't i just learn both languages?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by Kuro Tensai
    Y should i choose c++ instead of c?
    Why do you want to learn C or C++? Or, even more fundamentally: why do you want to learn a programming language?

    Quote Originally Posted by Kuro Tensai
    Can't i just learn both languages?
    You probably can learn both languages, unless you have some kind of learning impediment affecting your ability to learn how to program, in which case it does not matter if you choose C or C++ since you probably would not be able to learn to use either of them. That said, it might be a little more difficult to learn both at the same time, especially if you are new to programming.
    Last edited by laserlight; 11-01-2012 at 12:11 PM.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    A lot of people here will tell you it's very annoying to read text-speak. And disrespectful to those reading it.

  4. #4
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Yes, you can do everything (computable) in C that you can do in C++, and vice versa. The difference is that it is easier to do some things in C++ than it is in C, and vice versa (although that argument is technically blurred, since most of C before the 1999 C standard is practically a subset of C++).

    It is possible to learn one language, then the others. The problem with transitioning from one to the other is that quite a few good practices in C are bad practice in C++, and vice versa. It is therefore quite common for people who mix parts of the languages up.

    It is also technically possible to learn both C and C++ together (i.e. learn both in a way that allows you to understand which is which, and where they overlap). That is pretty difficult though, since a lot of teaching material mixes things up.

    Some describe C as a simple language that is easy to learn, and C++ as a complex language that is hard to learn. They are wrong. In reality, C is a complex language that is hard to learn (or, at least, it is hard to learn well), and C++ is a more complex language than C that is harder to learn well.

    The choice between C and C++ comes down to what type of things you intend to do with it. Most people asking this sort of question, however, don't have goals in mind that are even relevant to choosing between C and C++. A coin-toss is therefore as effective a method of choosing between C and C++ as anything else.



    And don't use "text speak". It is annoying, immature, lazy, and pointless in forums.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  5. #5
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    O_o

    a lotta ppl tl me htt tlkng like a ful is 'noying! yo! 4reals!

    If the neither you nor the community around what you wish to do imparts a preference it doesn't really matter.

    Flip a coin.

    Soma

  6. #6
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  7. #7
    Registered User ch4's Avatar
    Join Date
    Jan 2007
    Posts
    154
    I don't know why you're back still wondering which programming language to choose. It seems that your thoughts drop you into endless loops such as while(1).
    So write a break; statement and pick C.

  8. #8
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    Seriously, it really doesn't matter. Learn whatever you want to learn.

    If you started learning C two days ago, then you'd already have more C++ skills than if you started C++ right now, so there really is no wrong choice here.
    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"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. N Choose R
    By .ZG. in forum C Programming
    Replies: 7
    Last Post: 05-18-2004, 02:43 AM
  2. Help me choose a name please...
    By BillBoeBaggins in forum A Brief History of Cprogramming.com
    Replies: 19
    Last Post: 04-01-2004, 07:38 AM
  3. How do i choose..
    By vasanth in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 01-29-2003, 08:41 AM
  4. How do you choose...
    By Imperito in forum C++ Programming
    Replies: 8
    Last Post: 03-16-2002, 07:31 PM
  5. How did you choose your username
    By ihsir in forum A Brief History of Cprogramming.com
    Replies: 47
    Last Post: 02-02-2002, 07:00 AM