CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: CString

  1. #1
    Join Date
    Jan 2009
    Posts
    69

    CString

    Hi,
    I have following CString and ....

    Code:
    CString myString(_T("c:\Documents and Settings\joker\Desktop\Myfile.txt"));
    It compiles fine but I received following warnings.....
    warning C4129: 'D' : unrecognized character escape sequence
    warning C4129: 'j' : unrecognized character escape sequence
    warning C4129: 'D' : unrecognized character escape sequence
    warning C4129: 'M' : unrecognized character escape sequence

    Thanks

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: CString

    Wouldn't MSDN or your documentation be a better place to look first?

    C4129

  3. #3
    Join Date
    Jan 2009
    Posts
    69

    Re: CString

    You were right. I should have looked little more there (:
    It was \\ instead of \

  4. #4
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,654

    Re: CString

    A suggestion... for paths (in API params) / instead of \\ is ok these days.
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    https://visualstudio.microsoft.com/vs

  5. #5
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: CString

    I wished C++ had "verbose" strings like C#. Why don't they think at simple, but helpful things like that?
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured