Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium



Posted on 2004-10-26
Medium Priority
Last Modified: 2010-04-01

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.
Question by:icysmarty
LVL 55

Accepted Solution

Jaime Olivares earned 500 total points
ID: 12416923
^M is the legible representation of the carriage return character (not 2 characters). Its ASCII code is 13.

Author Comment

ID: 12416957
Cool.. thank you.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question