Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 12-09-2004, 01:40 PM   #1 (permalink)
gamehead200
Code Monkey
 
gamehead200's Avatar
 
Join Date: Oct 2004
Posts: 57
gamehead200 is an unknown quantity at this point
Differences

Can someone please explain to me what the differences between int, void, double, and float are? I'm so confused...
gamehead200 is offline   Reply With Quote
Old 12-10-2004, 02: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
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Red Hat version differences? Admin Linux / BSD / OS X 5 03-09-2003 11:45 AM


All times are GMT -8. The time now is 03:40 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting