CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

nl or endl or \n

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 23, 2011, 08:45
Default nl or endl or \n
  #1
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 17
ata is on a distinguished road
Hi FOAMers
can any one tell me what is the difference between nl and endl and \n
best regards
ata is offline   Reply With Quote

Old   January 23, 2011, 14:57
Default
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
endl flushes the buffer
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   January 24, 2011, 01:30
Default nl or endl or \n
  #3
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 17
ata is on a distinguished road
Dear Prof. Jasak
Thank you very much for quick reply.
Would you please tell me when we must use endl when nl and when \n?
Thank you very very much
ata is offline   Reply With Quote

Old   January 24, 2011, 04:45
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by ata View Post
Dear Prof. Jasak
Thank you very much for quick reply.
Would you please tell me when we must use endl when nl and when \n?
Thank you very very much
Google for "c++ flush buffer". If you're still in doubt use endl
gschaider is offline   Reply With Quote

Old   January 24, 2011, 04:54
Default nl or endl or \n
  #5
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 17
ata is on a distinguished road
Thanks a lot
ata is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 09:27.