Thread: Differences
View Single Post
Old 12-10-2004, 03:48 AM   #2 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
Actually a great question!

int = Whole numbers. Negative too. 1, 2, 0, -2 -1.
Minimal Range = -32767 to 32767

float = Real Numbers. Negative too. 1.09, 2.87, 0.76, -2.32 -1.88.
Minimal Range = System dependant!. Maximum 6 digits of precision!

double = Real Numbers. Negative too. 1.09, 2.87, 0.76, -2.32 -1.88.
Minimal Range = System dependant!. Maximum 10 digits of precision!

void
Let me quote the ISO C++ standard:
Quote:
9 --
The void type has an empty set of values. The void type is an incomplete type that cannot be completed.
It is used as the return type for functions that do not return a value. Any expression can be explicitly converted
to type cv void (5.4). An expression of type void shall be used only as an expression statement
(6.2), as an operand of a comma expression (5.18), as a second or third operand of ?: (5.16), as the operand
of typeid, or as the expression in a return statement (6.6.3) for a function with the return type void.
__________________
Valmont is offline   Reply With Quote