Printing a colored table , how to ?

This is a discussion on Printing a colored table , how to ? within the C++ Programming forums, part of the General Programming Boards category; Dear all , I don't have enough time to send a project . and I need to neat the ouptut ...

  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
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    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;
    }
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  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
    Portugal
    Posts
    7,514
    > 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)
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    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, 12:47 PM

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