Problem about Character Constant of \t

This is a discussion on Problem about Character Constant of \t within the C++ Programming forums, part of the General Programming Boards category; Hi, Code: str.append("\ \t racelog.txt"); I can't get my tracelog.txt file name, it was changed to racelog.txt automatically. How to ...

  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    48

    Problem about Character Constant of \t

    Hi,

    Code:
    str.append("\\\tracelog.txt");
    I can't get my tracelog.txt file name, it was changed to racelog.txt automatically.
    How to ?

    Appreciate your help.
    --------------------------------------------------------
    Newbie
    C/C#/C++
    swimming/cycling/running
    There is nothing more powerful than an idea.
    Except for an idea put into action.
    --------------------------------------------------------

  2. #2
    Registered User valaris's Avatar
    Join Date
    Jun 2008
    Location
    RING 0
    Posts
    507
    You're trying to save a file with '\t' in the filename? It's probably just not allowed in your OS and stripped out.

  3. #3
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    "\\tracelog.txt"
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  4. #4
    Registered User
    Join Date
    Mar 2009
    Posts
    48
    Quote Originally Posted by Magos View Post
    "\\tracelog.txt"
    Thank you, soluted as your guide. ^_^


    Hey valaris, thank you too. :-)
    --------------------------------------------------------
    Newbie
    C/C#/C++
    swimming/cycling/running
    There is nothing more powerful than an idea.
    Except for an idea put into action.
    --------------------------------------------------------

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. problem comparing character
    By winsonlee in forum C Programming
    Replies: 2
    Last Post: 03-19-2004, 12:15 PM
  2. Problem with character arrays in classes
    By spoketoosoon in forum C++ Programming
    Replies: 3
    Last Post: 03-16-2004, 03:57 AM
  3. empty character constant error
    By Sway in forum C++ Programming
    Replies: 1
    Last Post: 10-08-2002, 09:27 PM
  4. Problem comparing string from text file with string constant
    By XenoCodex Admin in forum C++ Programming
    Replies: 3
    Last Post: 07-25-2002, 11:17 AM
  5. UNICODE and GET_STATE
    By Registered in forum C++ Programming
    Replies: 1
    Last Post: 07-15-2002, 04:23 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21