Thread: Need help with drawing a line

  1. #1
    Registered User
    Join Date
    May 2002

    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.

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

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    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
    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
    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, 11:10 PM
  4. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of
    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, 04:53 PM