Thread: Compilation Problem w/ CR/LFs in Translated char strings

  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    1

    Question Compilation Problem w/ CR/LFs in Translated char strings

    With our old compiler we did not have a problem with carriage returns and line feed that were embedded in the translated char array.

    With our new compiler , we are encountering compilation errors when
    a CR is encountered within the char declaration.

    Is there a compilation flag / option that can be set to address this problem ???

    Here is an example of the problem of the translated char declaration to a different language and contains the embedded CR which causes the compilation error:

    static const char* test = "€T|ûg
    R¡NºTX";

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    If you want to embed a new-line in a string, you should use the newline character: ""€T|ûg\nR¡NºTX";

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Conversion Char To Char * Problem
    By ltanusaputra in forum Windows Programming
    Replies: 3
    Last Post: 03-01-2008, 02:06 PM
  2. Need help understanding info in a header file
    By hicpics in forum C Programming
    Replies: 8
    Last Post: 12-02-2005, 12:36 PM
  3. Storing strings in 2d char arrays problem
    By rainmanddw in forum C++ Programming
    Replies: 5
    Last Post: 10-22-2003, 05:41 PM
  4. Strings are V important...
    By NANO in forum C++ Programming
    Replies: 15
    Last Post: 04-14-2002, 11:57 AM
  5. String Processing Problem
    By muffin in forum C Programming
    Replies: 0
    Last Post: 08-24-2001, 10:13 AM