Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: [C++] Setting Variables to Binary Values...?  (Read 838 times)

0 Members and 1 Guest are viewing this topic.
[C++] Setting Variables to Binary Values...?
« on: November 26, 2006, 07:14:55 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 221
Okay, so, you know how you can set variables to Hex or Octal instead of Decimal by using the prefix '0x' for Hex and 'x' for Octal? (I think it was 'x'... I'm not really sure because I have no use for Octal  :lol:) Well, is there something like that you can do for binary?
« Last Edit: March 01, 2007, 01:20:37 am by 4Sword »
Logged
Re: [C++] Setting Variables to Binary Values...?
« Reply #1 on: November 26, 2006, 09:49:11 am »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6629
You can't explicitly express binary factors in C++, you must convert them to Hex or Decimal before you can use them. One you have done that you can then use the bitwise minipulation variables (<<, >>, !, &, |, etc.) to modify them.
Logged
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.053 seconds with 41 queries.

anything