473,396 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Using special chars in std::string

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
Jul 22 '05 #1
2 1619
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.
Jul 22 '05 #2

"Thorsten Viel" <t.****@netz98.de> wrote in message
news:c2*************@news.t-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
Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Victor Hannak | last post by:
I am taking a program written in Borland C++ Builder 4 and converting the non-GUI related code to be generic c++ that can run anywhere. My main issue at this point is dealing with the string...
10
by: Angus Leeming | last post by:
Hello, Could someone explain to me why the Standard conveners chose to typedef std::string rather than derive it from std::basic_string<char, ...>? The result of course is that it is...
7
by: Forecast | last post by:
I run the following code in UNIX compiled by g++ 3.3.2 successfully. : // proj2.cc: returns a dynamic vector and prints out at main~~ : // : #include <iostream> : #include <vector> : : using...
11
by: Christopher Benson-Manica | last post by:
Let's say I have a std::string, and I want to replace all the ',' characters with " or ", i.e. "A,B,C" -> "A or B or C". Is the following the best way to do it? int idx; while(...
2
by: Neil Zanella | last post by:
Hello, Consider the following program. There are two C style string stack variables and one C style string heap variable. The compiler may or may not optimize the space taken up by the two stack...
9
by: Fei Liu | last post by:
In Accellerated C++, the author recommends that in a header file one should not declare using std::string, using std::vector etc instead one should directly specify the namespace specifier in...
3
by: =?Utf-8?B?QW5keQ==?= | last post by:
Hello, I'm trying to use a string type variable inside a class. I can do this fine with no problems when the class is inside a cpp file simply by adding #include <string>. However, my program has...
11
by: Peter Olcott | last post by:
Does C++ have anything like this?
11
by: Angus | last post by:
I am working with a C API which often requires a char* or char buffer. If a C function returns a char* I can't use string? Or can I? I realise I can pass a char* using c_str() but what about...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.