Thread: anyone know C?
View Single Post
  #7  
Old 01-13-2010, 02:59 PM
dlevitt dlevitt is offline
89 300E
 
Join Date: May 2008
Location: Long Island, NY
Posts: 80
Quote:
Originally Posted by JollyRoger View Post
You can handle it in DOS by inserting the word "echo" above the pause statement, that will give you a new line.

You should post your code if you want help, given the information you gave, I am guessing you are missing a carriage return/line feed escape code at the end of your output statement. That will depend on the paltform:

On Unix, an ASCII newline (\n) LF (linefeed) character ends each line.

On Windows, an ASCII sequence CR LF (\r\n) (return followed by linefeed) ends each line.

On Macintosh, an ASCII CR (\r) (carriage return) character ends each line.
Hate to be a nit picker [I'm no longer on the ANSI C++ Committee], but the \r line separator was only for ancient Macs [System 7 and older], later Macs adopted the UNIX \n convention [but tolerate \r so they can read old files]

In current C standard output libraries [ #include ], you usually just specify a newline '\n' and the appropriate sequence is automagicly written to the output.
Reply With Quote