1. ## 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. Int stores numbers without decimals.
Double stores with them.

3. Originally Posted by Thegnome
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. Well, thanks that answers my questions, prefectly. So simple..

5. 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.)