Thread: int conversion operator

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    7

    int conversion operator

    Is there a "%?" conversion operator for binary?
    for example ...

    scanf("%d",&a);
    printf("%x",a);

    will convert a decimal number to a hexadecimal number.I didn't see a way to convert to binary.Am I missing something or do I have to do it the long way?

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    "long way"

    It'll be a good exercise (and won't be too long).

    gg

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    7
    OK,

    Thanks for pointing in the right direction CodePlug

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Drawing Program
    By Max_Payne in forum C++ Programming
    Replies: 21
    Last Post: 12-21-2007, 05:34 PM
  2. Moving Average Question
    By GCNDoug in forum C Programming
    Replies: 4
    Last Post: 04-23-2007, 11:05 PM
  3. Working with random like dice
    By SebastionV3 in forum C++ Programming
    Replies: 10
    Last Post: 05-26-2006, 09:16 PM
  4. Converted from Dev-C++ 4 to Dev-C++ 5
    By Wraithan in forum C++ Programming
    Replies: 8
    Last Post: 12-03-2005, 07:45 AM
  5. How do you search & sort an array?
    By sketchit in forum C Programming
    Replies: 30
    Last Post: 11-03-2001, 05:26 PM