Solved

^M

Posted on 2004-10-26
228 Views
Last Modified: 2010-04-01
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.
0
Question by:icysmarty
    2 Comments
     
    LVL 55

    Accepted Solution

    by:
    ^M is the legible representation of the carriage return character (not 2 characters). Its ASCII code is 13.
    0
     

    Author Comment

    by:icysmarty
    Cool.. thank you.
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

      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 …
    C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
    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.
    The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

    933 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now