|
-
Feb 22nd, 2001, 11:26 AM
#1
Thread Starter
Hyperactive Member
when do you use a unsigned integer. Is there a appropriate case? Thanks
Matt 
-
Feb 22nd, 2001, 12:09 PM
#2
Frenzied Member
Well. Not any special cases. It depends of the variable.
If you are sure that the variable will never have to hold a negative value but only positive values then use an unsigned variable (integer).
Unsigned integers can only hold positive values.
-
Feb 22nd, 2001, 03:10 PM
#3
Unsigned anything can only hold positive values.
-
Feb 22nd, 2001, 04:10 PM
#4
You would also use it when you need a bigger number. For example, the long datatype can only go up to approx. 2 billion, but when unsigned, it can go up to 4 billion.
-
Feb 22nd, 2001, 04:31 PM
#5
Frenzied Member
It is also used alot in APIs and DLLS.
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Feb 23rd, 2001, 10:06 AM
#6
Thread Starter
Hyperactive Member
thanks for the responces!
Matt 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|