#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Posts
    0
    Rep Power
    0

    escape characters


    Hi, I was wondering if there is a newpage escape character in c++ like the newline escape character("\n"). I am using gcc under linux. Any help would be appreciated
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    191
    \f is new page :)
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Posts
    0
    Rep Power
    0
    Thanks for the info but it still doesn't work. This is how I am using it:

    outFile << "someString\f someOther string";

    is there a special header file I have to include or something?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    191
    no. nothing to be included. But your OS and the output device need to support it ;)

    maybe the newpage escape character is not what you wanted... what effect do you want?

    the newpage character is for printers i think, i donīt think terminals or files support it (since they have no pages...)
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Posts
    0
    Rep Power
    0
    Basically I have made a employee punch Card program. You specify punch in times and punch out times from a file along with the employee id and the program keeps track of all regular time hours and over time hours per day. At the end of each week the program computes payments. Now I want the information of each employee on a new page. I used the \f on a file and all I get is a little box [] at the position that I typed it. I tried printing it out but it doesn't print on a seperate page. There must be something in the language the forces a new page. Thanks for the help
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    191
    the little box is the \f ("form-feed"). your program that displays the file is not compatible ;) it tries to display ascii 0x0c

    which os does your program run on?

IMN logo majestic logo threadwatch logo seochat tools logo