| View previous topic :: View next topic |
| Author |
Message |
timdunkit Advanced Cheater
Reputation: 0
Joined: 22 Aug 2007 Posts: 58
|
Posted: Wed Jul 09, 2008 9:01 pm Post subject: help please |
|
|
I'm trying to learn c++ and im stuck on the different value types, such as char, long, short, float double, etc, im just curious why are these important and what makes them so useful
ty for ur help |
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Wed Jul 09, 2008 9:33 pm Post subject: |
|
|
Well different value types can obviously hold different values. These is the basis of all useful programs. Variables hold user defined values or programmer defined values that are manipulated for program function. For example a calculator define variables of a specific integer data type (most likely signed long int) which will hold user specified values (i.e the numbers, the operator to use with the number). As for data types, they are needed because C++ is a highly-typed language as opposed to PHP which is loosely-typed, meaning that (in PHP) you don't define variable with a data type, they are assigned whey they are initialized. In C++ though, you have to specify what kind of value the variable will hold (i.e a character, a string, an integer, true or false, a byte, a positive or negative). So they both hold great importance to the functionality and capabilities of the program. _________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8588 Location: 127.0.0.1
|
Posted: Thu Jul 10, 2008 12:54 am Post subject: |
|
|
www.cplusplus.com
They have a full page that deals with the variable types, what they hold, etc. You should use their tutorial for the basics. _________________
- Retired. |
|
| Back to top |
|
 |
manc Grandmaster Cheater
Reputation: 1
Joined: 16 Jun 2006 Posts: 551
|
|
| Back to top |
|
 |
timdunkit Advanced Cheater
Reputation: 0
Joined: 22 Aug 2007 Posts: 58
|
Posted: Thu Jul 10, 2008 9:36 am Post subject: |
|
|
| ty for the help really appreciated it=) |
|
| Back to top |
|
 |
|