Thread: 'small' tabbing

  1. #1
    Registered User
    Join Date
    Mar 2010

    'small' tabbing

    Hello there,

    I'm wondering how I could make 2 character tabs in C...

    It's so that if I have, say, the variables a, b, c and d...

    I would like to have something like a*2 , b*2 etc... aligned under a, b etc... in printf. But as you can appreciate a*2, b*2, etc... could be 1 or 2 characters. So I need a tab that is only 2 characters...

    How could I achieve this?


  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Have you looked at how printf works? Especially the bit where they talk about "field width".

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to split long programe in small files
    By umeshjaviya in forum C Programming
    Replies: 11
    Last Post: 04-15-2008, 02:45 AM
  2. Small HTTP proxy
    By zacs7 in forum Networking/Device Communication
    Replies: 8
    Last Post: 09-11-2007, 03:53 AM
  3. want to make this small program...
    By psycho88 in forum C++ Programming
    Replies: 8
    Last Post: 11-30-2005, 02:05 AM
  4. FILES in WinAPI
    By Garfield in forum Windows Programming
    Replies: 46
    Last Post: 10-02-2003, 06:51 PM
  5. yhatzee, small straight
    By uglyjack in forum C++ Programming
    Replies: 2
    Last Post: 06-13-2002, 03:09 AM