byte B= 0x0F;// Hex. representaion --> How byte B=0001111 // Binary rep.?

Discussion in 'C++' started by Guest, Jul 26, 2004.

  1. Guest

    Guest Guest

    In C/C++ we can use hexadecimal notation as byte B= 0x0F;

    How can we use binary numbers representaion for the same assignmnet ie.byte
    B=0001111 // Binary rep.?
    Guest, Jul 26, 2004
    #1
    1. Advertising

  2. Re: byte B= 0x0F;// Hex. representaion --> How byte B=0001111 //Binary rep.?

    zoom wrote:
    > In C/C++ we can use hexadecimal notation as byte B= 0x0F;
    >
    > How can we use binary numbers representaion for the same assignmnet ie.byte
    > B=0001111 // Binary rep.?


    No such thing. You could use 'bitset', it can convert itself from
    a string of 0s and 1s.

    Victor
    Victor Bazarov, Jul 26, 2004
    #2
    1. Advertising

  3. On Tue, 27 Jul 2004 05:41:30 +1000, <zoom> wrote:

    > In C/C++ we can use hexadecimal notation as byte B= 0x0F;
    >
    > How can we use binary numbers representaion for the same assignmnet
    > ie.byte
    > B=0001111 // Binary rep.?
    >


    C++ does not support a binary representation for numeric literals.

    john
    John Harrison, Jul 26, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. bob

    rep

    bob, May 12, 2004, in forum: Java
    Replies:
    2
    Views:
    562
    Andrew Thompson
    May 13, 2004
  2. Replies:
    10
    Views:
    6,110
    Neredbojias
    Aug 19, 2005
  3. Bengt Richter
    Replies:
    6
    Views:
    439
    Juha Autero
    Aug 19, 2003
  4. protoss

    .rep format

    protoss, Dec 11, 2008, in forum: Java
    Replies:
    0
    Views:
    365
    protoss
    Dec 11, 2008
  5. Volkan Karaboða

    a crystall Rep. Problem

    Volkan Karaboða, Dec 8, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    86
    Volkan Karaboða
    Dec 8, 2003
Loading...

Share This Page