Using special chars in std::string

Discussion in 'C++' started by Thorsten Viel, Mar 3, 2004.

  1. Hi List,

    im trying to use special chars with the std::string (like S) but when i
    cout<< the string the special chars have disappeared.

    What's wrong here?

    Thanks in advance
     
    Thorsten Viel, Mar 3, 2004
    #1
    1. Advertising

  2. Thorsten Viel

    Aggro Guest

    Thorsten Viel wrote:

    > im trying to use special chars with the std::string (like S) but when i
    > cout<< the string the special chars have disappeared.


    Could you post here a _small_ yet full example code with all required
    header files and other stuff that is needed to compile it. And tell what
    is does and what you think it should do. That would help us to
    understand your problem.
     
    Aggro, Mar 3, 2004
    #2
    1. Advertising

  3. Thorsten Viel

    Mike Wahler Guest

    "Thorsten Viel" <> wrote in message
    news:c2548u$i31$01$-online.com...
    > Hi List,
    >
    > im trying to use special chars with the std::string (like S)


    There's nothing 'special' about the character 'S'.
    It's required to exist in the execution character set.

    > but when i
    > cout<< the string the special chars have disappeared.
    >
    > What's wrong here?


    Um, a bug on line 42? I.e. *show us the code!*

    Also check that all the characters of your string return
    true when passed as arguments to 'isprint()'

    -Mike
     
    Mike Wahler, Mar 3, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fei Liu
    Replies:
    9
    Views:
    468
  2. Jeffrey Walton
    Replies:
    10
    Views:
    973
    Mathias Gaunard
    Nov 26, 2006
  3. Hongyu
    Replies:
    9
    Views:
    965
    James Kanze
    Aug 8, 2008
  4. M.Posseth

    receiving ??? chars instead of "special" chars

    M.Posseth, Nov 15, 2004, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    285
    Dan Rogers
    Nov 16, 2004
  5. Jeff Miller

    Removing Special Chars from a String

    Jeff Miller, Jun 5, 2008, in forum: Ruby
    Replies:
    3
    Views:
    147
    Robert Klemme
    Jun 6, 2008
Loading...

Share This Page