best route to learning c++?

This is a discussion on best route to learning c++? within the C++ Programming forums, part of the General Programming Boards category; can anyone list topics in order in which they can best be learned? for example should i really bother learning ...

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    266

    best route to learning c++?

    can anyone list topics in order in which they can best be learned?
    for example should i really bother learning file i/o ?

    and the cprogramming tutorials listed dont really get into different ways of taking input that ive seen, and no real explanation of things that confuse me such as 'input streams' and such

    i say this because ive basicly come to a roadblock, i understand arrays and pointers to a certain basic extent already and dont know whats next, and even when practicing things that i assume ive mastered i run into problems that require more advanced methods that aren't possible at my skill level
    Last edited by rodrigorules; 11-27-2007 at 04:44 PM.

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,007
    Basic rule - when there's something you don't understand - ask.
    Istream and ostream are short names for input stream and output stream. Basically, an input stream is a stream, an object or something if you will, that takes (or recieves) data from somwhere, be it the screen, the keyboard or a file. The reverse is true for output stream - it's a stream that send data somehere - to the screen or a file, etc.
    Yes, I/O can be useful. Especially if you want to read/write files. It depends on what you want to do, really.

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    What do you want to achieve?

    Most books teach the basics first (simple variables, very basic I/O), then go on to more advanced concepts. You don't have to learn ALL of the advanced concepts [I have very little understanding of STL for example, but then where I work, using C++ in an embedded OS, it's not particularly useful, as there is no STL library to use in our OS].

    I would also say that you can't learn to program simply by reading tutorials - here or anywhere else. You do need a book. The tutorials are all fine and good, but you do need a few more words now and again.

    And there are two parts of learning you need:
    1. Learning to PROGRAM (as in the problem solving, designing, writing code part).
    2. Learning the language (e.g. C++).

    I think it was Salem that likened C++ with a model of car, and programming with "learning to drive". It doesn't make THAT much difference if you drive a pick-up truck, a compact car or a larger saloon car - you still need to know how to steer, brake, keep constant speed [preferrably roundabout the legal speed-limit when applicable], what road-signs mean, etc, etc. C++, C, Python, Java, etc, etc are all different types of cars. You need to learn to program, as well as getting used to where the gear-stick and indicator stalk is in the particular car you want to drive.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,007
    Oh, but there's scary stuff in there too. Most books will teach basics, but when it comes to real programming with Windows/Linux/GUI/etc, you'll be horribly confused of the complexity involved
    Still, one must learn the basics first, do tutorial samples and then move on to do simple applications yourself and step up to more advanced programs later.
    From experience comes power. The more you learn, the simpler it gets. When in doubt, a good programming forum (like this!) will answer your questions.

  5. #5
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Also, understand that you can't become an expert programmer in a matter of days - it takes months to get to the level where you can write a program of a few hundred lines that is "acceptable", and when you think that's "good enough", consider that professional programmers/software engineers work on code that is perhaps 30000 lines in one PART of the system, and the entire system may have a million or so lines of code - of course, this is not one persons work, but many people who work together, and some know the overall design, others know some low-level details in one corner [which is quite possibly very important], etc, etc.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  6. #6
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    Best way to learn is buy a book and dive in, code, and crash a million times. That's how you learn.

  7. #7
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    best route to learning c++?
    The best way is to take a class, 2nd-best is a book, and 3rd-best is to use online tutorials.

    Most beginning books cover essentially the same topics as the cprogramming.com tutorials, but with 300 to 700 pages of description & explanation.

    Most books (and tutorials) focus on the language, and are weak on programming concepts. A good beginning class should teach programming concepts, it will give structure to your study, and it gives you a chance to interact (and learn from) the instructor and the other students.

    can anyone list topics in order in which they can best be learned?
    Most C++ books & tutorials will follow a logical order, and the topics should build on each other. If you take a class, you will get assignments that "build on" almost everything you've learned up to that point.

    for example should i really bother learning file i/o ?
    Yes! Almost every program requires opening and saving files.

    and the cprogramming tutorials listed dont really get into different ways of taking input that ive seen, and no real explanation of things that confuse me such as 'input streams' and such
    A book should help. Or, you can search the Net. foldoc.org is a good starting-point for looking-up terms & concepts, but the definitions are very brief. cppreference.com and dinkumware.com good complete C++ language references, but they don't have much explanation or examples.


    i say this because ive basicly come to a roadblock, i understand arrays and pointers to a certain basic extent already and dont know whats next
    Well, if you are following the cprogramming.com tutorial, File I/O is next. You don't have to completely know and understand everything, but you need to know what C++ can do, and how to do a variety of things before you can write a useful program.

    and even when practicing things that i assume ive mastered i run into problems that require more advanced methods that aren't possible at my skill level
    This is normal. C++ is a complex language. And, it's not unusual for programmers to look something up... I have a bookshelf full of programming books, and I'm not an expert or a professional programmer. Once you've worked-through one or two tutorials (or a book), you will be in a better position to do research when you run-across something you don't understand. And, at that point, you might want to get a more advanced C++ book, or you might want to start studying a specific topic, like graphics/GUI programming or socket/network programming, etc.
    Last edited by DougDbug; 11-27-2007 at 06:44 PM.

  8. #8
    Registered User
    Join Date
    Mar 2007
    Posts
    416
    I learned C++ from the internet and kind of noticed that anything that is in a book, is almost always on the internet somewhere too. Although, books are way more handy to have. With whatever route you take you will get frustrated, make a million mistakes, and most likely not make anything that is too exciting to anyone else right off the bat (but you will probably think it's the coolest thing ever, i know i did ).

  9. #9
    Registered User
    Join Date
    Sep 2007
    Posts
    127
    I've found that writing your own program, like some kind of simple-ass word processor or something, makes it more interesting, and makes you actually learn what stuff does rather than just copying out examples etc. But that's just me.

  10. #10
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by bengreenwood View Post
    I've found that writing your own program, like some kind of simple-ass word processor or something, makes it more interesting, and makes you actually learn what stuff does rather than just copying out examples etc. But that's just me.
    No, it's not just you. Writing "proper" code that does something real, be it a small text-editor or a program to calculate the atomic weight of a molecule, a sudoku solver, a tic-tac-toe game or a database of your music it will teach you a lot more than if all you ever do is simple excercises that make 20 lines of code each.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  11. #11
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    And besides, it will increase your motivation.

    But the main point is that it makes you confront new problems. With small exercises, you solve a specific problem in a specific way. Because the exercise is part of a lesson, you just had an explanation of how to solve the problem.

    With real programs, you'll encounter new problems. You'll have to learn to identify the correct way of solving the problem. You may have to look techniques up, or research the problem to find a technique, and then learn the technique.
    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

  12. #12
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,007
    In short, what makes you a good programmer, you ask? Well, experience. The more you do, the better you get. Tutorials, books and classes are just to make sure you get to know the language, but doing something with this knowledhe is up to you. So work hard and make many applications and you'll be on your way to mastering the language!
    ...Like everyone else has stated already

  13. #13
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    Just to add one thing to the thread here.

    I highly recommend you start coding prior to reading tutorials on this or that. Tutorials are nice and handy but as some have pointed out they usually only apply to a set situation in a given context. Most of your problems are not going to be exactly like the tutorial but if you have already tried your own solution and failed, the tutorial might spark an 'aha' moment that may or may not have been intended by the author.

    You will hardly ever find how to do A in B with C type of answers in your programming adventures. Usually you have to do quite a bit of research from several different sites, books, etc., before you finally arrive at your own customized approach to the problem.

    If you don't know the answer knowing how and where to find the answer is just as important.

  14. #14
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Bubba View Post
    If you don't know the answer knowing how and where to find the answer is just as important.
    This is so true - and whenever you get "further" in your programming career, you will need to be able to find a solution to a problem that is unlike any other you have seen. If you are lucky, there is someone nearby that has some idea. Otherwise, you need to be able to find a solution on your own [or together with your collegues].

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  15. #15
    Registered User bobknows's Avatar
    Join Date
    Jan 2011
    Location
    SD
    Posts
    87
    i am to the point where i am writing code, know functions and classes ok, but need to know where to go next. it seems like i have just hit a pretty big jump. i have been working on a sudoku solver with around 350 lines but i need to learn inheritance and how to use classes better, any book\tutorial ideas?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Machine Learning with Lego Mindstorms
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 01-30-2009, 02:34 PM
  2. Best Approach for Learning
    By UCnLA in forum C Programming
    Replies: 5
    Last Post: 03-21-2008, 03:35 AM
  3. Need Help On a Simple Bank Program
    By oobootsy1 in forum C# Programming
    Replies: 9
    Last Post: 08-08-2005, 11:51 AM
  4. Fun Learning a New Language
    By UnregdRegd in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 09-30-2003, 11:03 PM
  5. Learning Rate Of C++
    By Krak in forum C++ Programming
    Replies: 27
    Last Post: 01-29-2003, 01:53 PM

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