Thread: Sereious Question: Best way to learn C++

  1. #61
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by laserlight View Post
    You might want to refer to tabstop's post #53. Basically, you are confusing classes and objects in your terminology. You could refer to Stroustrup's C++ online glossary:

    class - a user-defined type. A class can have member functions, member data, member constants, and member types. A class is the primary mechanism for representing concepts in C++.

    object - (1) a contiguous region of memory holding a value of some type. (2) a named or unnamed variable of some type; an object of a type with a constructor is not considered an object before the constructor has completed and is no longer considered an object once a destructor has started executing for it. Objects can be allocated in static memory, on the stack, on on the free store.
    Ahhh... see now even that helps! Sorry if I confused anyone... that certainly was not the intent.

    This is another point that was never clarified anywhere I've read... In fact, this clears up a lot of the confusion for me too. I did indeed think of classes and objects as being synonymous terms.

  2. #62
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Just a quick bump on this thread to say Thank You! to everyone who chipped into help me get my ole noggin around this objects thing.

    It is very much appreciated.

    I started with "Thinking in C++" this morning and, guess what... I think it's sinking in!

    Again... Thanks to all who helped.

  3. #63
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by CommonTater
    I started with "Thinking in C++" this morning and, guess what... I think it's sinking in!
    I suggest that you start with Accelerated C++ instead. Accelerated C++ uses an approach recommended by Stroustrup in his essay Learning Standard C++ as a New Language (PDF).
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  4. #64
    Registered User \007's Avatar
    Join Date
    Dec 2010
    Posts
    179
    Accelerated C++ is not bad too, it moved quickly which is nice but a large, large chunk of the start of the book can almost be skipped since you are a C programmer. I think accelerated C++ and thinking in C++ are my two favorite books for C++.

  5. #65
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by \007
    Accelerated C++ is not bad too, it moved quickly which is nice but a large, large chunk of the start of the book can almost be skipped since you are a C programmer.
    I don't recommend skipping any part of the book. Your C background will help you understand that "large, large chunk of the start" much more easily, but it still introduces things that differ from C and which are good to know as fundamentals.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Fmod question
    By spadez in forum C Programming
    Replies: 2
    Last Post: 04-17-2009, 05:26 PM
  2. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 12:14 PM
  3. Am I too late to learn programming?
    By maccat in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 02-17-2009, 08:49 AM
  4. Same old beginner question...
    By Sharmz in forum C Programming
    Replies: 15
    Last Post: 08-04-2008, 11:48 AM
  5. Very simple question, problem in my Code.
    By Vber in forum C Programming
    Replies: 7
    Last Post: 11-16-2002, 03:57 PM