Thread: another time the same FQ !!! C++ or C FIRST ??

  1. #1
    Registered User actionbasti's Avatar
    Join Date
    Dec 2002
    Posts
    48

    another time the same FQ !!! C++ or C FIRST ??

    im a beginner in programming .. but learning fast!

    i am still wondering what would be the benefit to start with C first, and then go to C++???

    I mean why would I wanna learn an old language that has an update , so that later i would have to lean those changes again.
    Can someone tell me some of those benefits in C that i dont c ??






  2. #2
    Programming Sex-God Polymorphic OOP's Avatar
    Join Date
    Nov 2002
    Posts
    1,078
    I'd say learn C++ but ONLY use the "c style" parts of it.

    By that I mean use a C++ compiler but only learn the procedural side of the language. Use new and delete over malloc and use the C++ style of dealing with struct type declarations (IE without the need of the keyword struct every time).

    C++ is a bit more typesafe than C and is therefore easier for someone to learn on. I don't recommend learning object-oriented programming until you understand the procedural programming extremely well, but do so in C++ not C.

    So, I say learn the "C side" of C++

  3. #3
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    C and C++ are two different languages, so your question is irrelevant.

    -Prelude
    My best code is written with the delete key.

  4. #4
    Programming Sex-God Polymorphic OOP's Avatar
    Join Date
    Nov 2002
    Posts
    1,078
    I think his question is very relevant. He wants to know if he should learn C and then C++ or just go right to C++.

  5. #5
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >He wants to know if he should learn C and then C++ or just go right to C++.
    That was my interpretation as well. The question is as irrelevant as asking whether to learn Ada before Pascal or just going right to Pascal, the decision is arbitrary. The relationship between C and C++ seems to confuse everyone into thinking that one should be learned first when it really doesn't matter.

    -Prelude
    My best code is written with the delete key.

  6. #6
    Programming Sex-God Polymorphic OOP's Avatar
    Join Date
    Nov 2002
    Posts
    1,078
    The order can make a difference.

    C++ dynamic memory allocation is more typesafe and easier to learn with, etc. There are many reasons to "skip C" and go directly to C++. True, it doesn't make as much of a differenceas people think, but the difference is there none-the-less! Maybe he isn't aware of how C and C++ are related, you could have at least given a quick explanation rather than just saying "it's irrelevent."

    You are mean!

  7. #7
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >There are many reasons to "skip C" and go directly to C++.
    I agree, my opinion is that C++ should be learned first, but it's just that, an opinion. I feel that C++ should be learned before Java too, but that seems kind of silly since C++ and Java are two different langauges (just like C and C++). When learning, it really doesn't matter what language you choose, they'll all teach you the basics of programming so that you can easily learn other languages. How quickly you learn or how well you learn is also insensitive to the language. I've known awful programmers who started with C++ and it didn't help, I've known superb programmers who started with BASIC and grew up with GOTO.

    My advice when it comes to which language you should use to learn with is always the same: pick on that looks neat and go with it. Trying to compare and contrast languages is a waste of time unless you have very specific needs. If you have very specific needs then you're probably not just starting out, so such comparisons are irrelevant, which was my point initially.

    >You are mean!
    Quite.

    -Prelude
    My best code is written with the delete key.

  8. #8
    Registered User actionbasti's Avatar
    Join Date
    Dec 2002
    Posts
    48

    THANKS

    Thank you everybody so far!!!


    Most of you are right, i guess, i should have asked first what the differences are of the Language C and C++ in order to find out whether it makes a difference to learn one before the other, or not!
    From your reactions i have received a good impression with which to start. I started before with Basic ( Liberty Basic ) and went on to Visual Basic, but i wanted a more powerful language, that is not only windows based. And I think that C++ is just that !?
    This is also why I asked about C or C++... I didnt know that those languages where not the same! What i had red befroe was that C++ was just an Update of C?!

    I think it is important to know the differences between all the languages. For porogrammers who are doing this more then just a hobby, it is actually extemly important, because of all the major and minor advantages and disadvantages of all languages!

    Which one do you prefer ???

  9. #9
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398

    Go straight to C++

    First I worked my way through "Teach Yourself C in 21 Days", then "Teach Yourself C++ in 21 Days".

    It was complertely unnecessary to learn C first. The only advantage of going through both books was that there is material in the C book which is skipped-over in the C++ book (in order to make room for the C++ specific stuff). This also made it easier for me to go through the C++ book.

    The main difference between C and C++ is that C++ allows classes and objects (i.e object oriented programming = OOP). An object is a particular instance of a class. The "21 Days" book uses an example where the class is Cat and the objects are Fluffy and Boots

    C and C++ are so similar that I can write a C program and compile it with a C++ compiler!

  10. #10
    Registered User actionbasti's Avatar
    Join Date
    Dec 2002
    Posts
    48

    to DougDbug

    Thanks DougDbug,

    this is actually the kind of answer i had been looking for!
    I have the C++ in 21 book too and this is what I will start with!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 26
    Last Post: 07-05-2010, 10:43 AM
  2. Replies: 11
    Last Post: 03-29-2009, 12:27 PM
  3. Is this really true or it's just science fiction?
    By Nutshell in forum A Brief History of Cprogramming.com
    Replies: 145
    Last Post: 04-09-2002, 06:17 PM
  4. time class
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 12-11-2001, 10:12 PM