To learn C or C++?

This is a discussion on To learn C or C++? within the C++ Programming forums, part of the General Programming Boards category; Greetings all. I have seen it touched on a bit in the FAQ, but I really still feel the need ...

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    5

    To learn C or C++?

    Greetings all.

    I have seen it touched on a bit in the FAQ, but I really still feel the need to ask before I dedicate my time to learning a language, I wanted to get a bit more info on the subject.

    Mostly, I would greatly like to simply learn C++, because for me it would be a refresher as I had used the language about 8/9 years ago when I was learning to program and wanted to, like so many, bust into the game industry. Unfortunately, I was sucked into Web Development as a profession, and learned many tools (PHP namely, which obviously has syntactical/structural similarities to the C family) but dropped away from more standard programming.

    However, my concern is one of platform independence. It seems that C++ is much more platform dependent than C. So, I guess my question is... is it worth learning C simply to maintain platform independent code, or is C++ a viable option to developing platform independent software as well?

    Thank you in advance,
    Xark

  2. #2
    ! |-| /-\ +3 1337 Yawgmoth's Avatar
    Join Date
    Dec 2002
    Posts
    187
    If your C++ compiler conforms to the ANSI standards (and most do) your code is totally portable.
    L33t sp3@k sux0rz (uZ it t@k3s 10 m1|\|ut3s 2 tr@nzl@te 1 \/\/0rd & th3n j00 h@\/3 2 g3t p@$t d@ m1zpelli|\|gz, @tr0(i0u$ gr@mm@r @|\|d 1n(0/\/\pr3#3|\|$1bl3 $l@|\|g. 1t p\/\/33nz j00!!

    Speling is my faverit sujekt

    I am a signature virus. Add me to your signature so that I may multiply.

  3. #3
    Registered User
    Join Date
    Feb 2003
    Posts
    5
    I see...


    May I ask, is there a particular tutorial/site/book that you might recommend (perhaps even on this site) that teaches the path to ANSI standard C++? What I mean is that I'm sure many tutorials are OS/System specific, and one would have to later go back and learn what is and is not ANSI standard.

    Also, do you think it is viable that serious application development could take place in purely ANSI std C++ or do you think that most applications require platform specific tools, APIs, etc that make it more efficient to use A) C or B) A different language perhaps?

    Thanks again,
    Xark

  4. #4
    Peace
    Join Date
    Aug 2001
    Posts
    1,510
    >>do you think that most applications require platform specific tools, APIs, etc

    Yes. Very much so, especially in the gaming industry. Its basically vital.

    It really depends on what you're trying to accomplish. Obviously there are many applications of C++ to which platform independance is irrelevent. Most non-standard C++ code will port very easily anyhow.

    I'd recomend C++ over C in a heartbeat.
    "There's always another way"
    -lightatdawn (lightatdawn.cprogramming.com)

  5. #5
    Just a Member ammar's Avatar
    Join Date
    Jun 2002
    Posts
    953
    I agree with lightatdown, that you should learn C++, not C.
    And yes most applications require platform specific tools.
    none...

  6. #6
    Registered User
    Join Date
    Feb 2003
    Posts
    5
    My thanks to the people who posted.

    I appreciate your rapid responses and I'll be taking your advice, and re-taking up C++. It was more or less the news I wanted to hear.

    Thank you once again,
    Xark

  7. #7
    Registered User carrja99's Avatar
    Join Date
    Oct 2002
    Posts
    56
    I must say that quite obviously, C++ is the way to go.

    As for platform dependence... which platforms are you planning on developing on? Although I'm practically sure you're going to be workin on a Windows based x86 system, C++ code is easily ported to linux as well, with the only conflict being, basically, Window APIs, which are pretty easy to get around by substitution.
    I am Error. When all else fails, use fire.

    My Current Screenshot

  8. #8
    Registered User
    Join Date
    Feb 2003
    Posts
    5
    The platforms that I was concerned with are, as you mentioned, Windows and Linux.

    As to the 'obvious' choice, it is better to have asked the opinion of those who may have more knowledge than myself, than to go with the option that appeared to be more appropriate.

    Thank you for strengthening my belief that C++ is the way to go.

    -Xark

  9. #9
    Registered User carrja99's Avatar
    Join Date
    Oct 2002
    Posts
    56
    No problem. If I may suggest, I suggest you just download a free compiler rather than plop hundreds on a Commercial compiler that gets you the same results. If you run linux like me, g++ comes with most distros almost as a standard.

    If you run windows, just download the windows port of gcc/g++, which is called DJPP I think.
    I am Error. When all else fails, use fire.

    My Current Screenshot

  10. #10
    Registered User
    Join Date
    Feb 2003
    Posts
    5
    Thanks...


    That's my current debate... compiler.

    I dual boot Windows/Linux, so I do have access to g++ and all the wonderful development tools available for linux. The only problem I have there is that I have yet to get my netgear card working under linux to run the roaring penguin pppoe package, so I don't have a network connection yet, cutting off alot of my access to resources.

    As far as Windows is concerned, I have downloaded Dev-C++, Borland 5.5, and I'm thinking of looking into DJGPP as I remember it from my 'old' days of learning c++ and hearing it thrown around alot. Back then I was using an old version of Borland Turbo C++. I also have MSVC++ 6.0, but I've heard horrible things about it, mostly that it is strictly for a Windows based development environment.

    Any advice that any one has here as far as compilers go... perhaps pros and cons, etc... would be extremely helpful.

    Thanks again for the great response, and thanks in advance for any further insight.

    -Xark
    Last edited by xarkorrn; 02-02-2003 at 09:09 PM.

  11. #11
    looking for the truth moemen ahmed's Avatar
    Join Date
    Feb 2002
    Location
    Egypt
    Posts
    161
    you was asking about resources and books, i may suggest books
    from harald online books , its great stuff there. take a look



    http://www.syndik.at/harald/regal/buecher/library.asp
    Programming is a high logical enjoyable art for both programer and user !!

  12. #12
    Burning in Hell! Luigi's Avatar
    Join Date
    Nov 2002
    Posts
    117
    C++ is very portable u can use it on every platform.
    for example I use on mac..
    c++ itself is the same on any platform what differs is the libraries(api) you had.
    for exemple windows use win32.lib
    mac use carbon.lib
    and im sure linux got his too..

    as for a book id say buy the c++ programming language.
    it was written by the inventor of c++ (bjarne stroustrup) can't beat that!

    Luigi

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. Witch to learn first?
    By Unregistered in forum Windows Programming
    Replies: 2
    Last Post: 06-17-2002, 12:06 AM

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