Thread: Help understanding!

  1. #1
    Registered User
    Join Date
    Jul 2006
    Posts
    10

    Help understanding!

    Well, I've gotten though 10 chapters of this book i am ready, and for whatever the reason I still dont seem to understand what the difference between, Int, Double, I cant seem to grasp what the main difference is between them. The book i currently have doesn't seem to explain that idea well enough. It talks about the in such depth and legth that they both sound the same!! So if someone could help me figure out what the main differences are, that would assist me a great deal.

    Thanks everyone!

  2. #2
    Registered User
    Join Date
    May 2006
    Posts
    630
    Int stores numbers without decimals.
    Double stores with them.

  3. #3
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by Thegnome View Post
    Well, I've gotten though 10 chapters of this book i am ready, and for whatever the reason I still dont seem to understand what the difference between, Int, Double, I cant seem to grasp what the main difference is between them. The book i currently have doesn't seem to explain that idea well enough. It talks about the in such depth and legth that they both sound the same!! So if someone could help me figure out what the main differences are, that would assist me a great deal.

    Thanks everyone!
    Do you know what an integer is?

    An "int" can only store integers. A "double" can store fractional values.

    For instance, there is no way to put the number 1.5 into an int. But you can put it in a double.

  4. #4
    Registered User
    Join Date
    Jul 2006
    Posts
    10

    Thumbs up

    Well, thanks that answers my questions, prefectly. So simple..

  5. #5
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    Well, I've gotten though 10 chapters of this book...
    One programming book isn't going to explain everything, or explain everything in a way you are going to understand. Most explanations of variable types expect you to already have a solid understanding of binary number representation.

    And, most programming books just jump into the details of the particular language without any general overview of programming*. So, the book might just point-out the C++ variable types and their limitations (or how to make a loop in C++) without any explanation of how & why these things are used.

    So, don't be too surprised if you have to search the Net or check another book (or ask a question here) before you understand something. I've got a bookshelf full of programming books, and I'm not really a programmer! (It's just a hobby.)



    * This makes it difficult to learn on your own, and it's one of the reasons that most beginning programmers are better-off taking a class than trying to learn completely on their own. (I've never taken a C or C++ class, but I've taken classes in a couple of other programming languages.)
    Last edited by DougDbug; 09-26-2007 at 07:07 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Understanding Headers
    By AeonMoth in forum C++ Programming
    Replies: 2
    Last Post: 06-27-2007, 05:53 AM
  3. Difficult time understanding generating terrain (from file)
    By indigo0086 in forum Game Programming
    Replies: 3
    Last Post: 06-07-2007, 11:36 PM
  4. trouble understanding the source file structure
    By Mario F. in forum C++ Programming
    Replies: 5
    Last Post: 05-26-2006, 06:46 PM
  5. understanding recursive functions
    By houler in forum C Programming
    Replies: 7
    Last Post: 12-09-2004, 12:56 PM