Learn C after C++?

This is a discussion on Learn C after C++? within the C++ Programming forums, part of the General Programming Boards category; Hi all. This is a strange question, but when I get to know enough of C++, is it wise to ...

  1. #1
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,475

    Learn C after C++?

    Hi all. This is a strange question, but when I get to know enough of C++, is it wise to then go and learn C?

    I know C++ is the superset of C and has new and better ways of doing things, but I was thinking that if I knew C and C++ rather indepth, would I stand a better chance getting a carrer in games programming later on? Or should I just stick with C++ and not bother learning C?

    In C++ I can do OOP very well now without any books for help. So I know I am learning it, and It shows it is sticking. Any suggestions appreciated

    Thanks!

  2. #2
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,231
    It is my question too!
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  3. #3
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,069
    It's not a bad idea to learn C. There is still code out there that is written in C and they're always looking for people that know how to read and write it. Get very comfortable with C++ to the point that you feel you could get an entry level job with your knowledge in it, then you could break into learning other languages such as Java, PHP, Delphi/Object Pascal and older languages such as C.
    Last edited by SlyMaelstrom; 03-01-2006 at 08:54 AM.
    Sent from my iPadŽ

  4. #4
    The Richness... Richie T's Avatar
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    469
    as far as i know, C++ is the industry preferred language because
    of the portability of OOP, but it certainly wouldn't hurt to learn
    C - the more you know, the more employable you are. my C++
    lecture says that he still uses printf from C if he just wants some
    nicely formatted output on screen for a console app, but i'll leave
    it to the more experienced programmers to determine whether it
    is good practice to mix in C stuff with a C++ program - in many
    cases it probably isn't. i learned C first and am finding C++ fine
    as a result, but the other way around might not be so pretty -
    look around the C forum to see how many people have problems
    with C memory allocation (C++ is far superior in that respect).
    I honestly think that it certainly would not be detrimental to learn
    C, just so long as you are clear about the differences. whether
    you'll find it useful or not is another matter...
    No No's:
    fflush (stdin); gets (); void main ();


    Goodies:
    Example of fgets (); The FAQ, C/C++ Reference


    My Gear:
    OS - Windows XP
    IDE - MS Visual C++ 2008 Express Edition


    ASCII stupid question, get a stupid ANSI

  5. #5
    Registered User
    Join Date
    Jan 2005
    Posts
    7,318
    Learning C is probably a good idea, especially if you've been learning "proper" C++ and using C++ tools instead of learning C with classes. It will teach you to use your programming skills in a very different environment. C++ only uses a little bit of procedural programming, whereas that is pretty much all of C's focus. In addition, the more low level you go by learning C and maybe assembly later, the more you understand the inner workings of the tools you use in C++ that abstract those details away. And expanded knowledge is a good thing when looking for a career.

    One separate question is whether now is the right time to take on C. You should probably emphasize one or the other when learning, and if you haven't mastered C++ to a comfortable level, you might not want to switch yet. C++ is more than just OOP. Do you understand how to use templates (use, not build)? Do you understand how to implement design patterns in C++? Do you feel like you know C++ best practices, or do you just know one way to use C++ that seems to work? If you feel comfortable with your knowledge of C++, even if you are not an expert, then it is fine to switch over to C, IMO.

  6. #6
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >when I get to know enough of C++, is it wise to then go and learn C?
    How do you define "enough" of C++?

    >I know C++ is the superset of C
    Not anymore, and it hasn't been for quite some time now.

    >and has new and better ways of doing things
    New, but not necessarily better. Don't fall prey to the hype.

    >would I stand a better chance getting a carrer in games programming later on?
    Yes. Game programming is an incredibly competitive field, and you can expect to be up against many of the most talented programmers in the world. The more you know, the better off you'll be.
    My best code is written with the delete key.

  7. #7
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    >when I get to know enough of C++, is it wise to then go and learn C?
    How do you define "enough" of C++?
    I've been learning c++ for nearly 10 years now and still learning! Does anyone really get to the point where he/she can say "I've learned all the c++ there is to learn?" And there are constantly being invented new ways to use to language.

  8. #8
    semi-colon generator ChaosEngine's Avatar
    Join Date
    Sep 2005
    Location
    Chch, NZ
    Posts
    597
    Quote Originally Posted by Ancient Dragon
    I've been learning c++ for nearly 10 years now and still learning! Does anyone really get to the point where he/she can say "I've learned all the c++ there is to learn?"
    I highly doubt it.

    Quote Originally Posted by Ancient Dragon
    And there are constantly being invented new ways to use to language.
    and this is the reason why. If you've read 'Modern C++ Design' cover to cover and understood all of it, and you can explain everything in Boost, and you can write template meta-programs and understand expresion templates, and know WHEN and WHY to use all these, I guess you can say you've completely mastered C++. I doubt anyone on earth would claim that.

    That's not to say you shouldn't branch out and learn other languages though. Personnally I wouldn't recommend C unless you plan to work in the embedded world. Try learning a completely different language like python, lisp or (if you're some sort of masochist) perl.

    actually no, don't learn perl.
    "I saw a sign that said 'Drink Canada Dry', so I started"
    -- Brendan Behan

    Free Compiler: Visual C++ 2005 Express
    If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?

  9. #9
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >I've been learning c++ for nearly 10 years now and still learning!
    I've been learning C++ also for nearly 10 years, and I wouldn't claim to *know* half of it, much less have mastered that much.

    >Does anyone really get to the point where he/she can say "I've learned all the c++ there is to learn?"
    Ah, but there's a difference between "I've learned all the C++ there is to learn" and "Okay, enough is enough". Most of us don't want to learn everything C++ has to offer because we simply won't use it. In cases like that it's practical to determine the point at which you can stop an intensive focus because any more would be wasted effort. Such effort would be better spent learning something we actually intend to use.
    My best code is written with the delete key.

  10. #10
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,231
    What C can do that C++ can't?
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  11. #11
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >What C can do that C++ can't?
    Work on some embedded systems that can't handle C++.
    My best code is written with the delete key.

  12. #12
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,231
    Nothing other than that?
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  13. #13
    Registered User
    Join Date
    Jan 2005
    Posts
    7,318
    Don't think of C and C++ as syntax rules where C++ is almost a complete superset of C. In that case, you will find very little use for C. You should instead think of the languages as styles of programming. Sure, C++ syntax rules allow you to use malloc, realloc and free, but if you use those extensively in your program, you are really writing C code. If you look at it that way, you see many instances where C code can do more than the higher-level C++ equivalent.

  14. #14
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,231
    If you look at it that way, you see many instances where C code can do more than the higher-level C++ equivalent.
    Where can I see those instances? What are they? I only want to know.
    I have a C book that will start reading it after current C++ book.
    Last edited by siavoshkc; 03-01-2006 at 04:03 PM.
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  15. #15
    aoeuhtns
    Join Date
    Jul 2005
    Posts
    581
    The main point of C++ is to add amounts of dynamic typing to C. This is done with inheritance and templates. Exceptions (and C's lack of them) are another noticeable difference.

    C lets you assign the return value of malloc without demanding a cast. That's generally not construed as a feature or misfeature, it's just a difference (and a reason why C++ isn't a superset of C). And you don't have to worry about exceptions leaving behind leaks. (You do have to worry about catching error codes on return values, though). This is another reason you can't haphazardly mix C code in C++. Neither language gives you magical powers (over your computer) that the other lacks.
    There are 10 types of people in this world, those who cringed when reading the beginning of this sentence and those who salivated to how superior they are for understanding something as simple as binary.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Do you ever try to learn too much?
    By Stonehambey in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 06-17-2008, 07:55 AM
  2. Looking to learn C++
    By Fuzzy91 in forum C++ Programming
    Replies: 40
    Last Post: 04-13-2006, 02:38 AM
  3. You have to learn C in order to learn C++
    By gandalf_bar in forum A Brief History of Cprogramming.com
    Replies: 20
    Last Post: 07-16-2004, 10:33 AM
  4. Novice trying to learn C++
    By dead in forum C++ Programming
    Replies: 10
    Last Post: 12-01-2003, 08:25 PM
  5. Advice on how to being to learn C++
    By VenomUK in forum C++ Programming
    Replies: 9
    Last Post: 05-18-2002, 01:06 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21