Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

new line in a string 1

Status
Not open for further replies.

chineerat

Technical User
Oct 12, 2003
42
TT
how you do you test for the condition that varible is a new line. here space is a string
eg
space = ifile.peek() ;
std::cout<<space;
if (space==?????what to put in here?)
stuff in here;
 
A new line character is a 0x0A. A carriage return character is a 0x0D. However, I'm not sure if this is what you want to know....

Greetings,
Rick
 
space=='\n' //compare to new line
space=='\r' //compare to carriage return
space=='\\' //compare to slash
space == 'n' //compare to letter n

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top