^M

Hi,

I need to upload my program to a unix station. When I uplaod the program to the unix station, each end of file will be followed by ^M.
I have an option to remove it using the command or capture this sequence in my own program and ignore it or do soemthing to it.
So, my question is how do I suppose to capture this in C++. I tried using ^(97) and M(77) but it doesn't work.
Any advise will be appreciated.
icysmartyAsked:
Who is Participating?
 
Jaime OlivaresConnect With a Mentor Software ArchitectCommented:
^M is the legible representation of the carriage return character (not 2 characters). Its ASCII code is 13.
0
 
icysmartyAuthor Commented:
Cool.. thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.