Thread
:
Printing escape sequences using printf()?
View Single Post
Nov 3rd, 2005, 10:08 PM
#
6
bivhitscar
Hobbyist Programmer
Join Date: Oct 2005
Location: Melbourne, Australia
Posts: 126
Rep Power:
3
Quote:
Originally Posted by
InfoGeek
You can do something like
(
Toggle Plain Text
)
if(ch=='\n') printf("<new-line> - %3d",ch); else if(ch==' ') printf("<space> - %3d",ch);
if(ch=='\n') printf("<new-line> - %3d",ch); else if(ch==' ') printf("<space> - %3d",ch);
Yeh, I just ended up using a switch. Thanks though.
__________________
it's ironic considerate rarity patron of love higher knowledge engulfs me...
bivhitscar
View Public Profile
Find More Posts by bivhitscar