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; Originally Posted by Elysia That is what I figured. If you are used to C++, you would get frustrated with ...

  1. #31
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Quote Originally Posted by Elysia View Post
    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!
    But the best way is if you're used to both! Then you use a library, if there is some that fits you, otherwise you implement one of your own (instead of getting frustrated).
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  2. #32
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,549
    Quote Originally Posted by maxorator View Post
    But the best way is if you're used to both! Then you use a library, if there is some that fits you, otherwise you implement one of your own (instead of getting frustrated).
    Aye, no arguments there. I am kindof like that myself. Like to implement my own stuff.
    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.

  3. #33
    Registered User
    Join Date
    Nov 2008
    Posts
    10
    Hehe, anyway, I just checked out my copy of C++ How to Program 3rd Edition, the book I'm planning to read first. Anyway, it says that the first 5 chapters are the "C" part of C++, datatypes arrays etc, and at the end of every chapter there's a Talking in OOP part, used to get the reader familiar with OOP concepts.

    @Daved
    The rest of the chapters are more C++ or oop chapters and as described before, the first 5 chapters are procedural programming. What do you think?

  4. #34
    Registered User
    Join Date
    Jan 2005
    Posts
    7,317
    It's C-style C++. Not worthless, but not ideal. If you want to learn modern C++ you'll have to get another book. If getting another book will be difficult, then this one is fine. Just remember that you'll need to adjust your learning to account for the difference.

    For example, if you stick with the 3rd edition then come on to the forum and ask a question about why this isn't working:
    Code:
    char word[] = "hello";
    char input[10];
    cin >> input;
    if (input == word)
    you'll be told that you can't use == with C style strings and that you should be using C++ strings instead. I don't know if the third edition talks about C++ strings, but if it doesn't you'll have to go look them up outside of your book. The same thing will happen quite a few times. You'll still end up learning, just not quite as smoothly as you could.

    Is vector mentioned in the index at all? If not, then you'll be having to do a lot of research outside the book, and you'll probably end up buying a second book anyway.
    Last edited by Daved; 11-04-2008 at 12:38 PM.

  5. #35
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    I'm not 100% sure, but I dont think vector is actually part of the C++ standard, its part of the STL.
    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.

  6. #36
    Registered User
    Join Date
    Jan 2005
    Posts
    7,317
    It's part of the standard.

    The STL is an informal name often used to refer to the containers and algorithms in the standard library. The name comes from the actual STL library from SGI (I think) that formed the basis for the completed standard library. However, when people refer to the STL now, they're almost always referring to the stuff inside the C++ standard.

  7. #37
    Registered User
    Join Date
    Nov 2008
    Posts
    10
    Hmm, haven't seen vectors in my book, that's a negative.
    Anyway, by pure chance I downloaded vector tutorials the day I learned basic C++.
    I'm going to read the book, and after that I'll read some other books I can get my hands on, hopefully, I can get the C++ Primer,
    although I'm having trouble finding Accelerated C++.

    What do you think about this:

    The C++ Standard Library: A Tutorial and Reference

  8. #38
    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
    Hmm, haven't seen vectors in my book, that's a negative.
    Anyway, by pure chance I downloaded vector tutorials the day I learned basic C++.
    I'm going to read the book, and after that I'll read some other books I can get my hands on, hopefully, I can get the C++ Primer,
    although I'm having trouble finding Accelerated C++.

    What do you think about this:

    The C++ Standard Library: A Tutorial and Reference
    That's more of a reference, or an intermediate tutorial (like someone transitioning). Meaning it assumes you are comfortable with C++ and just teaches you STL. It's not that hard finding e-books (wink wink - buy them if you like them). I really liked Accelerated C++, but I haven't looked into C++ How to Program (latest edition might be better, I don't know).
    Warning: Have doubt in anything I post.

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

  9. #39
    Registered User
    Join Date
    Nov 2008
    Posts
    10
    Still, I'll take the chance and read the third edition thoroughly and then read e-books, I can get a lot of e-books.

  10. #40
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Quote Originally Posted by Daved View Post
    It's part of the standard.

    The STL is an informal name often used to refer to the containers and algorithms in the standard library. The name comes from the actual STL library from SGI (I think) that formed the basis for the completed standard library. However, when people refer to the STL now, they're almost always referring to the stuff inside the C++ standard.
    Nope, looking at a copy of the proposed standard (yeah im that old) now, vector isnt part of it.
    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.

  11. #41
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,652
    Quote Originally Posted by abachler
    Nope, looking at a copy of the proposed standard (yeah im that old) now, vector isnt part of it.
    Maybe you're looking at too old a copy of the proposed standard.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  12. #42
    Registered User
    Join Date
    Jan 2005
    Posts
    7,317
    >> Nope, looking at a copy of the proposed standard (yeah im that old) now, vector isnt part of it.

    Interesting. I'm looking at the actual standard, and vector is right there.

    Quote Originally Posted by ISO/IEC 14882
    23.2.4 Class template vector

    A vector is a kind of sequence that supports random access iterators. In addition, it supports (amortized)
    constant time insert and erase operations at the end; insert and erase in the middle take linear time. Storage
    management is handled automatically, though hints can be given to improve efficiency. The elements of a
    vector are stored contiguously, meaning that if v is a vector<T, Allocator> where T is some type
    other than bool, then it obeys the identity &v[n] == &v[0] + n for all 0 <= n < v.size().

    ...

  13. #43
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    vector is in the actual standard, and also in the 1997 final public draft, which is available for free:
    http://www.open-std.org/jtc1/sc22/open/n2356/
    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. #44
    Registered User
    Join Date
    Nov 2008
    Posts
    10
    Hmmm, I'm planning on reading C++ Primer 4th after the book I mentioned.

  15. #45
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    ah, the 'new' c++98 standard, my copy is an older version published in 1994.
    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.

Page 3 of 3 FirstFirst 123
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