CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   nl or endl or \n (http://www.cfd-online.com/Forums/openfoam/84211-nl-endl-n.html)

ata January 23, 2011 09:45

nl or endl or \n
 
Hi FOAMers
can any one tell me what is the difference between nl and endl and \n
best regards

hjasak January 23, 2011 15:57

endl flushes the buffer

ata January 24, 2011 02:30

nl or endl or \n
 
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

gschaider January 24, 2011 05:45

Quote:

Originally Posted by ata (Post 291826)
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

ata January 24, 2011 05:54

nl or endl or \n
 
Thanks a lot


All times are GMT -4. The time now is 04:57.