Fixed Q: HEX <-> DEC const value conversion in C source file?

Discussion in 'C++' started by ^_^, Jan 6, 2004.

  1. ^_^

    ^_^ Guest

    How to convert HEX <-> DEC constant value in C source file, and write out
    the result c files?

    a=4;
    b=6;

    from or to


    a=0x4;
    b=0x6;

    howto?
     
    ^_^, Jan 6, 2004
    #1
    1. Advertising

  2. ^_^

    David Harmon Guest

    On Wed, 7 Jan 2004 08:53:40 +0900 in comp.lang.c++, "^_^"
    <> was alleged to have written:
    >a=4;


    >from or to


    >a=0x4;


    The constants 4 and 0x4 both represent the same int, without any
    conversion. What are you trying to accomplish?
     
    David Harmon, Jan 7, 2004
    #2
    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. Replies:
    10
    Views:
    6,269
    Neredbojias
    Aug 19, 2005
  2. ^_^
    Replies:
    2
    Views:
    383
    Ben Pfaff
    Jan 6, 2004
  3. Alex Vinokur
    Replies:
    2
    Views:
    5,119
    Basil
    Nov 26, 2004
  4. ^_^
    Replies:
    2
    Views:
    488
    Ben Pfaff
    Jan 6, 2004
  5. ^_^
    Replies:
    3
    Views:
    1,083
    Thomas Matthews
    Jan 9, 2004
Loading...

Share This Page