Thread: C or C++?

  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    14

    C or C++?

    Ok, well I have basic knowledge in both of these languages. Should I learn C or C++?

    C++ is more needed to do Half-Life 2 (game) modifying (code-wise) but I hear if you learn C, you can learn C++ VERY quickly and also have understanding in all other languages basically.

    I am 15 and would like the easier one. Any help is much appreciated.

  2. #2
    old man
    Join Date
    Dec 2005
    Posts
    90
    Quote Originally Posted by LordBronz
    C++ is more needed to do Half-Life 2 (game) modifying (code-wise)
    That's a good enough answer to your question: focus on what you're going to use.

    I am 15 and would like the easier one.
    Well, I'm 51 (I'm expecting wisdom and maturity to overtake me Any Day Now ...)

    Anyway, if you spend time and effort on C first, and that's not what you're going to be using, that doesn't seem the easiest way to me.

  3. #3
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    Learning C++ with a good toturial can do what learning C does. I suggest this one:
    http://www.uow.edu.au/~nabg/ABC/ABC.html
    It uses old headers but I think it is outstanding. Once I began with teach your self in 24h VC++6, it was't what I liked, it started with windows. But this one is pure C++, not the visual. After mastering it maybe I turn back and read " teach your self in 24h ".
    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

  4. #4
    ---
    Join Date
    May 2004
    Posts
    1,379
    There is no need to learn C before learning C++. They are just as easy to learn as each other, however, C++ has OOP features which can be hard to get a grasp on. But you don't need to use them until you feel comfortable. I have no idea what it takes to mod HL2.

  5. #5
    aoeuhtns
    Join Date
    Jul 2005
    Posts
    581
    Quote Originally Posted by LordBronz
    I hear if you learn C, you can learn C++ VERY quickly and also have understanding in all other languages basically.
    My recommendation: Put these on your curriculum in any order:
    - C++
    - C
    - Ruby
    - Scheme
    - Perl
    At some point in time (at about the same time you learn Scheme, assuming you do), make sure you understand these terms:
    - closure
    - call-with-current-continuation
    Just play around. Do whatever you want, but at some point write some programs in each of those languages. Ignore this post until you're bored with C++ one day. It's not true that C and C++ give you understanding in all other languages, but they (along with all other programming languages) do improve your general ability to solve programming problems. Using other languages makes it easier for you to think in different ways, especially Scheme, and you'll be more capable in all respects after learning each one on the list.

    In general, though, I'd focus more on writing neat programs than learning languages.

  6. #6
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    ditch the Scheme and Perl, add Python and Java

  7. #7
    old man
    Join Date
    Dec 2005
    Posts
    90
    Hey, you forgot common lisp!

    ((((actually, I hate all those parentheses))))

  8. #8
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    And Ada?
    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

  9. #9
    60% Braindead
    Join Date
    Dec 2005
    Posts
    379
    What about Assembler (Hard language to get :P)?

    I would say C++, its newer but its not so new it has no support. It has more concepts to grasp, but theirs nothing thats actualy downgraded from c. I mean how can it be? Its c++. (Or more clearly;
    Code:
    c=c+1;
    )

    .
    Code:
    Error W8057 C:\\Life.cpp: Invalid number of arguments in function run(Brain *)

  10. #10
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    Assembler is good
    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
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    so is a screwdriver

  12. #12
    ex-DECcie
    Join Date
    Dec 2005
    Posts
    125
    I'm not quite as old as eerok, but I'm close, so here's my 2 cents worth:

    I don't think anyone would disagree when I say that programming is not about what language you use. It's a mindset, a philosophy, a methodology of thinking. The language is just the way you express that.

    I've seen folks come along who "knew" (their word) Visual Studio C++ or whatever. They couldn't program very well at all. They thought that knowing that was enough. It's not.

    In my humble opinion, programming is 90% how you're going to solve the problem regardless of the language, and 10% being skilled enough in a language to implement your solution. It also helps to know the strengths and weaknesses of various languages so you can hopefully choose a language that makes that implementation a bit easier.

    I started with assembler years ago because I needed to. Didn't have to worry about C vs. C++ when it was time to learn that because there was only C. Learned C++ with all its "OOP-ness" later on, and it was another tool in the bag.

    Know Perl (and Python), and currently use Perl mostly for those quick and dirty programs that are best cobbled up in those idioms. Why Perl and not Python? Simple answer -- becasue other folks here who might need to maintain my code know Perl and don't (currently) have time to wrap their brains around Python.

    So, if you're modding Half-Life and need C++, learn it. Read lots of code, other people's code. Get to know what is good and bad.

    Participate in forums -- after all these years I'm still learning stuff from knowledgeable folks in this forum.....

    And good luck!

  13. #13
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Quote Originally Posted by Rashakil Fol
    My recommendation: Put these on your curriculum in any order:
    - C++
    - C
    - Ruby
    - Scheme
    - Perl
    Those are nice languages, but I'd relegate Perl to your Free Time (TM) and add Haskell instead. Nothing like a functional language to get you thinking in different ways, even more so than Scheme does. (Scheme is somewhere midway between C and Haskell.)
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  14. #14
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    maintain Perl code? Perl is write only code

    But you're right, often (mostly) the language used is less important than the reason why it's used.
    That said, there are languages I loathe and won't willingly work in. Sadly I'm forced to work in one of them, the jobmarket here being what it is I've been unable to avoid it (and no, it's not Java).

  15. #15
    Registered User
    Join Date
    Feb 2006
    Posts
    14
    C++ it is! Thanks alot for the support here everyone . I'ma get started right away.

Popular pages Recent additions subscribe to a feed