Is learning C/C++ worth it?

This is a discussion on Is learning C/C++ worth it? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I want to hear them . You can bash my theory, just not me *cough* Elysia...

  1. #16
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    I want to hear them . You can bash my theory, just not me *cough* Elysia

  2. #17
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,527
    My theory is that C++ is worth it to learn it because I am studying it right now. Anything I study is important.

  3. #18
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Just try the following if you want to know how necessary C++ is

    Write a hardware driver in JAVA
    Write an OS in C#
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  4. #19
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    > Write a hardware driver in JAVA
    I'd do that in C, C++ is not necessary . You could also write the driver in C/Java via the JNI (ugly, and really... who would?).

    > Write an OS in C#
    I'd also do that in C

    I fail to see how your example show the necessity for C++ specifically. It should be noted that Java does not need to run on a VM. So point 1 is highly possible, and point 2 is possible in non-standard obscure Java. Check out GCJ http://gcc.gnu.org/java/
    Last edited by zacs7; 11-04-2008 at 03:50 AM.

  5. #20
    Registered User
    Join Date
    Nov 2008
    Posts
    10
    Thanks everyone for your comments! It is deeply appreciated.
    I have decided to learn C++ first as soon as the vacation hits, which was my original plan, but I'm hoping that it will make me at least 60% comfortable with the C syntax/way of programming, if I decide to learn C after C++.

    What is your opinion of the above?

    Again, thanks everyone for the comments, so far.

  6. #21
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,173
    C++ and C syntax is very similar. You are probably just going to struggle with the typical lack of tools that everyone in C++ takes for granted (std::vector, for example), that does not exist in the C standard library (that is not to say, though, that there are not any implementations out there).

    Anyway, good luck.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

  7. #22
    Registered User
    Join Date
    Nov 2008
    Posts
    10
    You mean #include <vector>?
    What is C used for primarily these days? Surely not everyday desktop applications?
    Is it only used for drivers and/or operating systems?

    I'm just guessing since it's a mid-level or lower level language.

    Thanks for the good luck, anyway can't wait for the exams to finish.
    My first book I'm going to read is "C++ How to Program" by Deitel and Deitel,
    next I'll read some e-books?

    Any books I should look out for?

  8. #23
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Write an OS in C#
    Singularity?

    I'm actually really curious to learn more about that - I'm sure there must be plenty of cheating involved. At the very least using a different compiler.

  9. #24
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    You are probably just going to struggle with the typical lack of tools that everyone in C++ takes for granted (std::vector, for example), that does not exist in the C standard library (that is not to say, though, that there are not any implementations out there).
    I had gotten so used to the C-way of doing things, that when I started working in a high-level language it actually caused me problems. I would find something that needed implementing, implement it the way my brain automatically thought was best, and then when I was almost done, I found there was some high-level data-structure I had almost never heard of that did exactly what was needed. So had I known the high-level one, I would've been faster, but now it actually slows me down to go and learn the high-level way.

    On the reverse side of that - our project is starting to get unnecesarily slow, so perhaps some of my techniques would've been the better option.

  10. #25
    Dae
    Dae is offline
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Quote Originally Posted by C/C++ Learner View Post
    You mean #include <vector>?
    What is C used for primarily these days? Surely not everyday desktop applications?
    Is it only used for drivers and/or operating systems?

    I'm just guessing since it's a mid-level or lower level language.

    Thanks for the good luck, anyway can't wait for the exams to finish.
    My first book I'm going to read is "C++ How to Program" by Deitel and Deitel,
    next I'll read some e-books?

    Any books I should look out for?
    C is used for operating systems, drivers, DLLs, hardware, robots, stuff like that almost exclusively (engineering). As mentioned, C is still used for many libraries and programming languages (opengl, mysql, curl, perl, php). This includes Python, which is gaining popularity. I believe you can only use C for Python modules, not C++. It's used a lot in game hacking (with ASM), although usually wrapped in C++ classes to make it fancy. There's not a lot of cases where it'd be advantageous to use C over C++, but there's cases where your C++ is mostly just C. Games used to use C but started transitioning to C++ nearly 10 years ago (takes time to give up the libraries these companies have). C is still great for small scripts, much like perl. You'll see it used a lot for math computations.

    Accelerated C++
    C++ Primer

    Read the stickies:
    C++ Book Recommendations
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  11. #26
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Generally the C style means "implement it yourself" and C++ style means "use an external library".

    It is good to know how to implement things yourself, since anyone seriously into programming will, at some point, need to actually create something. The fact that external libraries have often implemented ways to do what you need doesn't mean you never have to actually do something from scratch.

    A C++ programmer who isn't familiar with the C style is clumsy, a c++ programmer who isn't familiar with the C++ style is impractical.
    Last edited by maxorator; 11-04-2008 at 09:42 AM.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  12. #27
    Registered User
    Join Date
    Jan 2005
    Posts
    7,317
    >> I have decided to learn C++ first as soon as the vacation hits, which was my original plan, but I'm hoping that it will make me at least 60&#37; comfortable with the C syntax/way of programming, if I decide to learn C after C++. <<

    This sounds like a good plan to me. You'll be comfortable with the syntax, but will likely have to learn a different way of programming if/when you switch to C (and that's a good thing).

    Is the Deitel and Deitel book you've got the 6th edition? I'd highly recommend getting the latest edition if you can, otherwise you'll likely end up learning the C-style C++ that I recommended against.

  13. #28
    Registered User
    Join Date
    Nov 2008
    Posts
    10

    Appreciated

    Once again thanks everyone.

    @Daved

    No, my version is the third edition... Is that bad?
    I can get the fifth edition, though?

    @Dae

    Thanks for the book suggestions.
    I read somewhere that I should alternatively read The C++ Primer Plus to C++ Primer?

  14. #29
    Registered User
    Join Date
    Jan 2005
    Posts
    7,317
    I'm not familiar with the differences between the editions other than the fact that the 6th edition has added more information about modern C++. I would imagine the 5th edition would be better than the third.

    If you can't get the 6th, it sounds like you'll learn C-style C++. I don't recommend it, but you'll be ok. Just understand that a lot of the techniques you learn aren't really recommended any more. You'll still get a sense of the language and improve your general programming skills.

    If you can get Accelerated C++, I'd definitely recommend that over an old Deitel and Deitel edition.

    Oh, and you should prefer C++ Primer (4th edition) over C++ Primer Plus (again because C++ Primer Plus teaches C-style C++).

    Some books that teach C-style C++ are easier to follow and better at teaching, but I'd prefer to use a book that teaches the latest style adequately over one that teaches outdated stuff well.

  15. #30
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,173
    Quote Originally Posted by sean View Post
    I had gotten so used to the C-way of doing things, that when I started working in a high-level language it actually caused me problems. I would find something that needed implementing, implement it the way my brain automatically thought was best, and then when I was almost done, I found there was some high-level data-structure I had almost never heard of that did exactly what was needed. So had I known the high-level one, I would've been faster, but now it actually slows me down to go and learn the high-level way.

    On the reverse side of that - our project is starting to get unnecesarily slow, so perhaps some of my techniques would've been the better option.
    That is what I figured. If you are used to C++, you would get frustrated with the lack of tools and libraries.
    If you were used to C, you would likely try to implement everything yourself using low-level code.
    It takes a while to get used to the change!
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

Page 2 of 3 FirstFirst 123 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Learning game programming worth it?
    By taver in forum Game Programming
    Replies: 6
    Last Post: 07-04-2009, 11:07 AM
  2. Machine Learning with Lego Mindstorms
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 01-30-2009, 01:34 PM
  3. Need Help On a Simple Bank Program
    By oobootsy1 in forum C# Programming
    Replies: 9
    Last Post: 08-08-2005, 10:51 AM
  4. Is it worth the time....worth the sacrifice?
    By Leeman_s in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 05-04-2002, 06:33 PM
  5. API learning reference (for those who are learning)
    By steve_i83 in forum Windows Programming
    Replies: 1
    Last Post: 11-04-2001, 12:58 AM

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