Thread: cprintf() formatting text

  1. #1
    1.b4 e5 2.a3 d5 3.d4 exd
    Join Date
    Jan 2003
    Posts
    167

    cprintf() formatting text

    How can I get these to be on different lines? I am converted from cout << so that I can use color, Ive never used cprintf before.

    Code:
       	textcolor(LIGHTCYAN);
    cprintf("***********************");
    cprintf("***************************");
    cprintf("*****      blahblah      *****");
    cprintf("**** blabblahblahblah ****");
    cprintf("***************************");
    cprintf("*************************");

  2. #2
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398

    \n = newline escape character

    cprintf("***********************\n");

  3. #3
    1.b4 e5 2.a3 d5 3.d4 exd
    Join Date
    Jan 2003
    Posts
    167
    When I add \n what I get is this
    Code:
    ***************
                                   ****************
                                                                   *******************
                                                                                                        **
    ************
                            *********

  4. #4
    Registered User
    Join Date
    Jan 2002
    Posts
    387
    use \r\n
    "There are three kinds of people in the world...
    Those that can count and those that can't."

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Formatting a text file...
    By dagorsul in forum C Programming
    Replies: 12
    Last Post: 05-02-2008, 03:53 AM
  2. Formatting the contents of a text file
    By dagorsul in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2008, 12:36 PM
  3. How to use FTP?
    By maxorator in forum C++ Programming
    Replies: 8
    Last Post: 11-04-2005, 03:17 PM
  4. Removing text between /* */ in a file
    By 0rion in forum C Programming
    Replies: 2
    Last Post: 04-05-2004, 08:54 AM
  5. Replies: 1
    Last Post: 07-13-2002, 05:45 PM