Thread: Printing a colored table , how to ?

  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    40

    Printing a colored table , how to ?

    Dear all , I don't have enough time to send a project . and I need to neat the ouptut of the program in a nice colored table. is there something ready that can I apply without too much manipulation.

    The table looks like :

    Code:
    ---------------------------------------------
    |                   Header                |
    ---------------------------------------------
    |    word    |    ID    |  symbol |   ID  |
    |                |           |              |         |
           .               .            .             .
           .               .            .             . 
    ----------------------------------------------

    thank you

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Code:
    #include <stdio.h>
    
    int main()
    {
    	FILE* f = fopen("1.html","w");
    	if(!f)
    		return 0;
    	fprintf(f,"<html><head></head><body><H1>table</H1><table><hr><hd><font color=\"red\">Hello</font></hd></hr></table></body><html>");
    	return 0;
    }
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    Registered User
    Join Date
    Nov 2006
    Posts
    40
    thank you , but I need to see the table in the command line !

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    > is there something ready that can I apply without too much manipulation.

    Nope.
    Look for NCurses (portable) or Conio (Win32 non portable) libraries. Or windows.h (also non portable)
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Frustated with mess table printing
    By benedicttobias in forum C Programming
    Replies: 6
    Last Post: 04-16-2009, 05:50 PM
  2. Writing array, to file
    By zootreeves in forum C Programming
    Replies: 9
    Last Post: 09-08-2007, 05:06 PM
  3. extra word printing
    By kashifk in forum C++ Programming
    Replies: 2
    Last Post: 10-25-2003, 04:03 PM
  4. inputting words from a file
    By kashifk in forum C++ Programming
    Replies: 5
    Last Post: 10-24-2003, 07:18 AM
  5. Printing characters not in the ASCII table
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 01-21-2002, 01:47 PM