Thread: char and ascii

  1. #1

    char and ascii

    if I want to see if TempChar (type char) is a carriage return, what is the value of carriage return?
    ex: if (TempChar==??) where ?? is the value of the carriage return.
    I tried '13', '\r' but it didn't work.
    please help.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    The ANSI-C end of line character is line feed, which is written as '\n'.

  3. #3
    it works.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 02-21-2009, 03:12 PM
  2. C++ ini file reader problems
    By guitarist809 in forum C++ Programming
    Replies: 7
    Last Post: 09-04-2008, 06:02 AM
  3. Code review
    By Elysia in forum C++ Programming
    Replies: 71
    Last Post: 05-13-2008, 09:42 PM
  4. Replies: 11
    Last Post: 03-24-2006, 11:26 AM
  5. Checking ascii values of char input
    By yank in forum C Programming
    Replies: 2
    Last Post: 04-29-2003, 07:49 AM