Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: Does std::string supports wide characters?

Started 1 month ago by bajajv
Hello, I am trying to implement the CString class. I can implement the functions using the standard namespace string class, but not sure whether it will support the wide characters or not. Also, please suggest that how can I check for characters of other languages? Can I get characters of other languages by changing the language settings of my machine?
Site: Expert Communities - bytes  Expert Communities - bytes - site profile
Forum: c  c - forum profile
Total authors: 160 authors
Total thread posts: 3 posts
Thread activity: 219 new posts during last week
Domain info for: bytes.com

Other posts in this thread:

hschew00 Newbie replied 3 months, 2 weeks ago
Is there a way to declare a string where inside the string, a predefined label is included? I.e., #define MY_CODE 0x1000 char str[]="Here is MY_CODE"; //will not work I know Any way to get around this instead of hard-coding it?

hschew00 Newbie replied 3 months, 2 weeks ago
Jos, Thanks for the quick reply. However, although it works, can you explain to me how it works in preprocessor? Intuitively I thought the above 2 defines is equivalent to sth like this #define concat(a,b) a###b Of course the above didn't work.

jesical Banned replied 3 months, 2 weeks ago
مرحبا اسمي ملكة جمال jesical ، رأيت بروفايلك اليوم ، وبعد ذلك تمر ، ط ملء المزيد من الاهتمام للاتصال بك ، وأنا مثلك من فضلك أرسل لي رسالة بالبريد الالكتروني على عنوان بريدي الالكتروني الخاص عبر (jesicalbaby61@yahoo.com.hk) بالنسبة لي أن أرسل إليكم لبلدان جزر المحيط الهادئ ، واقول لكم المزيد عني. ثم من هنا يمكننا أن نتحرك on.I سيكون في انتظار ردكم على رسالتي above.thanks عنوان البريد الإلكتروني...

jesical Banned replied 3 months, 2 weeks ago
مرحبا اسمي ملكة جمال jesical ، رأيت بروفايلك اليوم ، وبعد ذلك تمر ، ط ملء المزيد من الاهتمام للاتصال بك ، وأنا مثلك من فضلك أرسل لي رسالة بالبريد الالكتروني على عنوان بريدي الالكتروني الخاص عبر (jesicalbaby61@yahoo.com.hk) بالنسبة لي أن أرسل إليكم لبلدان جزر المحيط الهادئ ، واقول لكم المزيد عني. ثم من هنا يمكننا أن نتحرك on.I سيكون في انتظار ردكم على رسالتي above.thanks عنوان البريد الإلكتروني...

jesical Banned replied 3 months, 2 weeks ago
Quote: Originally Posted by saravanan82 Hi All, I tried to execute follwoing program, which got killed by the OS. #include<stdlib.h> main() { while(1) { char *c=(char*)malloc(10000); } } I got one message stating "Killed" in the command prompt. Pls, any one can explain me why it got killed by the OS. Note: OS: Linux Compiler: g++...

onkardesai replied 3 months, 2 weeks ago
can i get a C code to read a number until -1 is entered ..and then print each number per line

JosAH replied 3 months, 2 weeks ago
Quote: Originally Posted by onkardesai can i get a C code to read a number until -1 is entered ..and then print each number per line What have you done yourself already? We are not going to do your homework for you because we would learn even more (if it were new to us) and you wouldn't learn anything at all. You don't want that do you? kind regards, Jos

onkardesai replied 3 months, 2 weeks ago
firstly i hv done my BE ..hm work and all is over for me in school days ..i dont want the exact code or sumthin ..i dont even expect tht ..i jst want to know the logic .i guess we can solve this by malloc and realloc ..can u suggest me sum different method ..jst give me logic ..i ll post my code

JosAH replied 3 months, 2 weeks ago
Quote: Originally Posted by onkardesai firstly i hv done my BE ..hm work and all is over for me in school days ..i dont want the exact code or sumthin ..i dont even expect tht ..i jst want to know the logic .i guess we can solve this by malloc and realloc ..can u suggest me sum different method ..jst give me logic ..i ll post my code You're programming in C so ...

unixabhi replied 3 months, 2 weeks ago
While specifying path try "/" rather than "\". Ex: If your file is in C: Type c:/something.txt Quote: Originally Posted by Banfa If you are getting NULL returned it is because the program was unable to open the file. This could be because You have the name of thje file wrong in the function call You have the path to the file wrong in the function call...

 

Top contributing authors

Name
Posts
Banfa
133
user's latest post:
array
Published (2009-12-14 07:27:00)
The address of a[0] and a are not stored anywhere, they are a property of a[0] and a. The address of a[0] and the address of a are the same because a[0] is the first element in a. Think of a row of cars parked nose to tail. The start of the row of cars and the start of the first car in the row are at the same place. That place is not stored anywhere because there is no place for storing places on the street, there is only places for storing cars.
weaknessforcats
73
user's latest post:
Question about arrays and...
Published (2009-12-13 12:29:00)
Read this: Arrays Revealed
tvnaidu
55
user's latest post:
LNK ERROR:Using...
Published (2009-12-11 10:58:00)
when I build my final executable using shared libs, I just replaced static with shared in makefile, also I have .a files availbale for static and .so files available for shared. I did small test, when I remove one library linking for static, I got many undef symbols, final exe file didn't built, the same test I did for shared, everytime execubale builts no matter whether I have all shared lib linking with -l option or not, looklike final...
RRick
52
user's latest post:
Finding length of Dynamic Array...
Published (2009-12-10 17:55:00)
Quote: You can not work out the size of allocated data from y alone, you need n too ...... size = sizeof(int) * n; That's the problem with using C/C++ arrays. If you want to avoid overflowing or out of bounds elements in the array, you must keep track of the size (i.e. the n value). If this sort of thing seems laborious and dangerous, try the STL vector. It deals with those issues.
donbock
35
user's latest post:
some doubts on undefined behaviour
Published (2009-12-11 13:57:00)
Quote: Originally Posted by banfa Examine the code more closely, it is not a pointer that is being passed but a structure. You are quite right. I missed the asterix (*) that dereferenced px. Definitely undefined behavior.
newb16
26
user's latest post:
how come i can't view my...
Published (2009-12-12 11:14:00)
You check for p[i][n].occupied==true condition when you print, but never assign .occupied the &quot;true&quot; value.
bajajv
22
user's latest post:
how to add null at the end of...
Published (2009-12-14 05:28:00)
Hi, I want to implement the cstring class using wstring. but in assignement operator, I need to know how to add null while assigning some wchar_t type of data to the wstring. below is my code - class CString { public: wstring wStr; CString () {wStr = L&quot;&quot;;} CString (wstring str) {wStr = str;} CString&amp; operator =( const CString&amp; stringSrc ); CString&amp; operator =( wchar_t wcChar ); }; int main() { CString...
scienceman88
21
user's latest post:
how can I create a header file ?
Published (2009-12-03 05:27:00)
when I debug it was asking for an exe to debug with I chose the one it allowed me to without typing but that doesn't work. How do I change it now ? second unless I have a code back to the header how am I going to test the code ? so do I connect it to the exe that I've now made then change the code to point towards the header and act on the codes ?
whodgson
18
user's latest post:
want to see some example code on...
Published (2009-12-13 22:29:00)
I hesitate to take this further after the comprehensive treatment above as am no expert however here is a coded example from my book &quot;Programming with C++&quot; by John R Hubbard pp 331 Expand | Select | Wrap | Line Numbers #include&lt;iostream&gt; #include&lt;vector&gt; using&nbsp;namespace&nbsp;std; &nbsp; typedef&nbsp;vector&lt;double&gt;Vec;...
destination
18
user's latest post:
array
Published (2009-12-14 08:27:00)
Car parking example was awesome.Really a gr8 explanation A big thanx to you Banfa.You are gr8.

Related threads on "Expert Communities - bytes":

Related threads on other sites:

Thread profile page for "Does std::string supports wide characters?" on http://bytes.com. This report page is a snippet summary view from a single thread "Does std::string supports wide characters?", located on the Message Board at http://bytes.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity