Does C++ Primer offer non-trivial example programs? If not, pleasesuggest a book that does.

Discussion in 'C++' started by Aditya Raj Bhatt, May 8, 2014.

  1. I am seeing recommendations for C++ Primer everywhere (on the C++-faq lite,the stackoverflow list of C++ books) and other places. Now, I bought it and went through the index, but I was dismayed to find only C++ _features_ listed, and no sign of any non-trivial examples.

    I have gone through Object Oriented Programming in _Turbo_ C++ by Robert Lafore. While severely outdated, it taught me many useful applications of thefeatures in C++ (A card game, a horse simulation, fractals, a small adventure game) etc. I was wondering if C++ primer offers examples like this. I find it gets very dull if they just say something like, "you can pass a reference parameter using &. Eg.

    void Examplefunction (int &x, int &y) {
    x=5; y=6;
    }

    int main() {
    int x,y; Examplefunction(x,y);
    return 0;
    }

    "


    Stuff like this is very boring to me, with no possible application. I mean,I am not a very creative person, and unless the application of a concept is shown to me explicitly through some useful example, I have a hard time remembering it. So can someone tell me if C++ Primer offers things like this (please mention what specific example it is). And if not, please recommend a book that is heavy on both explanation and big examples (at least, big from the point of a beginner).

    Thank you and sorry for being overly verbose. This is my first post on thisgroup.
     
    Aditya Raj Bhatt, May 8, 2014
    #1
    1. Advertisements

  2. Re: Does C++ Primer offer non-trivial example programs? If not,please suggest a book that does.

    NOTE : This is strange, I formatted my message to 80 columns wide in vim but am still seeing it in this stupid long-form. Testing again, please ignore the duplicate.

    I am seeing recommendations for C++ Primer everywhere (on the C++-faq lite, the
    stackoverflow list of C++ books) and other places. Now, I bought it and went
    through the index, but I was dismayed to find only C++ _features_ listed, and
    no sign of any non-trivial examples.

    I have gone through Object Oriented Programming in _Turbo_ C++ by Robert
    Lafore. While severely outdated, it taught me many useful applications of the
    features in C++ (A card game, a horse simulation, fractals, a small adventure
    game) etc. I was wondering if C++ primer offers examples like this. I find it
    gets very dull if they just say something like, "you can pass a reference
    parameter using &. Eg.

    void Examplefunction (int &x, int &y) {
    x=5; y=6;
    }

    int main() {
    int x,y; Examplefunction(x,y);
    return 0;
    }

    Stuff like this is very boring to me, with no possible application. I mean, I
    am not a very creative person, and unless the application of a concept is shown
    to me explicitly through some useful example, I have a hard time remembering
    it. So can someone tell me if C++ Primer offers things like this (please
    mention what specific example it is). And if not, please recommend a book that
    is heavy on both explanation and big examples (at least, big from the point of
    a beginner).

    Thank you and sorry for being overly verbose. This is my first post on this
    group.
     
    Aditya Raj Bhatt, May 8, 2014
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. johny smith
    Replies:
    7
    Views:
    513
  2. hugo
    Replies:
    1
    Views:
    510
    Ali Cehreli
    Aug 17, 2004
  3. baibaichen

    trivial or non-trivial object

    baibaichen, Jan 12, 2006, in forum: C++
    Replies:
    3
    Views:
    1,354
    osmium
    Jan 12, 2006
  4. arnuld
    Replies:
    1
    Views:
    439
    Marcus Kwok
    Jul 13, 2007
  5. arnuld

    C++ Primer example 7.2.2

    arnuld, Aug 12, 2007, in forum: C++
    Replies:
    3
    Views:
    3,235
    Frank Birbacher
    Aug 12, 2007
  6. Johannes Bauer
    Replies:
    25
    Views:
    14,168
    James Kanze
    Jul 31, 2010
  7. Casey Hawthorne
    Replies:
    14
    Views:
    732
  8. aminer

    I want to offer two Perl programs...

    aminer, Dec 16, 2011, in forum: Perl Misc
    Replies:
    1
    Views:
    416
    aminer
    Dec 16, 2011
Loading...