What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Saveing in C++

Saveing in C++
Author: Message:
Choli
Elite Member
*****

Avatar
Choli

Posts: 4714
Reputation: 42
42 / Male / Flag
Joined: Jan 2003
RE: Saveing in C++
quote:
Originally posted by CookieRevised
Though, the actual color used by windows consists of 4 individual values. so instead of a maximum of FFFFFF (hexadecimal) you can have FFFFFFFF (hexadecimal), or a maximum of 32bits. But the principle is just the same of course...
the 8 extra bits are used for transparency (alpha channel) so at the end you still have 24 bits.
quote:
Originally posted by CookieRevised
go from -32767 to +32767 [...] So, a signed 32bits number goes from -2^31+1 to +2^31-1, thus from -2147483647 to +2147483647
actually signed numbers stored with n bits go from -2^(n-1) to 2^(n-1) - 1, ie: from -32768 to 32767 and from -2147483648 to 2147483647 for 16 and 32 bits ;)
quote:
Originally posted by CookieRevised
Now, instead of storing the number as a signed number and then calculate the unsigned number from it when you read it again, you could also store it directly as a unsigned number of course. There are functions for that in each programming language, thus including C++
I'd use that signed (and maybe negative) number to store the color and wouldn't change/convert it. You don't have to worry about what number it saves, you just know that the same that saves you can read it later and will be a valid number that represents a color (or whatever other thing you want to save).,
Messenger Plus! en espaņol:
<< http://www.msgpluslive.es/ >>
<< http://foro.msgpluslive.es/ >>
:plus4:
01-03-2005 11:39 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Saveing in C++ - by DJeX on 01-02-2005 at 09:34 PM
RE: Saveing in C++ - by RaceProUK on 01-02-2005 at 10:18 PM
RE: Saveing in C++ - by DJeX on 01-02-2005 at 10:59 PM
RE: Saveing in C++ - by Choli on 01-02-2005 at 11:08 PM
RE: Saveing in C++ - by DJeX on 01-03-2005 at 01:58 AM
RE: Saveing in C++ - by CookieRevised on 01-03-2005 at 02:58 AM
RE: Saveing in C++ - by Choli on 01-03-2005 at 08:51 PM
RE: Saveing in C++ - by DJeX on 01-03-2005 at 09:37 PM
RE: Saveing in C++ - by TheBlasphemer on 01-03-2005 at 09:51 PM
RE: Saveing in C++ - by DJeX on 01-03-2005 at 10:26 PM
RE: Saveing in C++ - by Choli on 01-03-2005 at 10:27 PM
RE: Saveing in C++ - by CookieRevised on 01-03-2005 at 11:11 PM
RE: Saveing in C++ - by Choli on 01-03-2005 at 11:39 PM
RE: Saveing in C++ - by DJeX on 01-04-2005 at 01:07 AM
RE: Saveing in C++ - by RaceProUK on 01-04-2005 at 05:56 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On