Dismiss Notice

Welcome To CK5!

Registering is free and easy! Hope to see you on the forums soon.

Score a FREE t-shirt and membership sticker when you sign up for a Premium Membership and choose the recurring plan.

C++ books?

Discussion in 'The Lounge' started by TX Mudder, Jul 5, 2002.

  1. TX Mudder

    TX Mudder 1/2 ton status

    Joined:
    Jul 10, 2000
    Posts:
    2,514
    Likes Received:
    0
    Location:
    Houston
    I decided, for no good reason, to lean C++.
    I have Borland C++ 5.02 compiler.
    The help files are decent, but I'm still pretty lost.
    For example, the line
    data = ok_to_kill;
    was not legal, even though both variable were defined (one globally, the other one just in the function, I guess that's locally?) But, by adding the asterick, it compiled fine.
    *data = *ok_to_kill;
    And all the help file said was something about object definitions.
    So, i need a decent book. Anyone have suggestions? I already bought one book, Teach yourself C++ in 24 hours, but it's not right.
    In the examples, it uses stuff like
    cin >> variable_one;
    and
    cout << "\n Here we go " << name << ".\n";

    whereas I have to program like this in Borland C++ 5.02
    scanf("%20s", variable_one);
    and
    printf("\n Here we go again %s.\n",name);

    I am at a loss as to why my book isn't any good for my compiler.
    -- Mike
     
  2. bobsurf

    bobsurf 1/2 ton status

    Joined:
    Jun 26, 2001
    Posts:
    410
    Likes Received:
    0
    Location:
    San Marcos, CA
    If I remember correctly, the functions like scanf and printf originated in C (still can be used in C++). However the >> and << functions (used in conjuction with cin and cout) are a cleaner (less keystrokes??? /forums/images/icons/tongue.gif ) method of input and output. I've got a book I used for my classes that is pretty good. It's C++ Primer Plus, 3rd edition, by Stephen Prata (The Waite Group??). If you're interested, I'll sell it to you for dirt cheap, it's barely been used.

    Your book might not be good for your compiler if they are different versions.
     
  3. muddysub

    muddysub 1 ton suburban status Staff Member Moderator GMOTM Winner

    Joined:
    Jun 23, 2001
    Posts:
    10,451
    Likes Received:
    489
    Location:
    my garage, Henderson, NV
  4. TX Mudder

    TX Mudder 1/2 ton status

    Joined:
    Jul 10, 2000
    Posts:
    2,514
    Likes Received:
    0
    Location:
    Houston
    What do you want for it shipped to 77515 (Angleton, TX)
    -- Mike
     
  5. newyorkin

    newyorkin 1 ton status

    Joined:
    May 8, 2001
    Posts:
    16,555
    Likes Received:
    157
    Location:
    Los Estados Unitos
    Dang, I want to get into this... Right now I'm living in Batch and VBscript...
     
  6. bobsurf

    bobsurf 1/2 ton status

    Joined:
    Jun 26, 2001
    Posts:
    410
    Likes Received:
    0
    Location:
    San Marcos, CA
    I paid $50 for it originally, but you can buy them used on Amazon for roughly $35 (list price printed on the book). Shipping (airborne express ground, 5lb) is $5.00. If you want it, I'll send it off to you for $20.00 including shipping.
     
  7. TX Mudder

    TX Mudder 1/2 ton status

    Joined:
    Jul 10, 2000
    Posts:
    2,514
    Likes Received:
    0
    Location:
    Houston
    I managed to download two good C++ books for free.
    When you put a little time into it, it's amazing what you expensive things you can get for free.
    Thanks a lot. If I hadn't found these, I would be buying your book.
    -- Mike
     
  8. bobsurf

    bobsurf 1/2 ton status

    Joined:
    Jun 26, 2001
    Posts:
    410
    Likes Received:
    0
    Location:
    San Marcos, CA
    No worries, good luck with it all.
     

Share This Page