Need help with drawing a line

This is a discussion on Need help with drawing a line within the C Programming forums, part of the General Programming Boards category; Hi people, Is anyone know how to create a nice (thinner) vertical line with C. I have tried to draw ...

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    85

    Need help with drawing a line

    Hi people,
    Is anyone know how to create a nice (thinner) vertical line with C.
    I have tried to draw a vertical line running on
    DOS console, but the line looks thick in width
    and ugly, unlike the horizontal line which is thin and nice look.
    For horizontal line, I use the character value 196
    which look real cool:
    for (i= 0; i<80; i++)
    printf("%c", 196);

    For vertical line, I have tried using character value 186 (also tried 204) and running a loop with
    it to produce a thicker verticle line.
    ------------- I am a good looking(thin)line.
    |
    |
    |
    |
    I
    am
    fat(thicker)
    line.

    Is there possible a character value(in character set) to draw verticle line thinner like 196 horizontal line?
    Thanx in advance
    DV007

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,333
    Code:
    for ( i = 128 ; i <= 255 ; i++ ) {
      printf( "%d = %c\n", i, i );
    }
    Look at the output and find a suitable graphical char

    If there isn't one, you're out of luck

  3. #3
    Registered User
    Join Date
    May 2002
    Posts
    85
    I got no luck. Thanx anyway.
    I just wonder C (expert) programmers out there have to create their own needed graphic characters when develop a GUI applications such as similar to Spreadsheet? Anybody know?

  4. #4
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Windows apps aren't restricted to the ASCII character set. Nor are DOS ones, it you have graphics libraries with your compiler.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 19
    Last Post: 05-30-2007, 05:47 PM
  2. Move the Caret to a line
    By TheDan in forum Windows Programming
    Replies: 3
    Last Post: 08-07-2005, 12:59 PM
  3. Read only one line using seekg
    By RedZippo in forum C++ Programming
    Replies: 3
    Last Post: 03-31-2004, 10:10 PM
  4. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM
  5. SSCANF help
    By mattz in forum C Programming
    Replies: 7
    Last Post: 12-10-2001, 03:53 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21