Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

SiCrane

Member Since 09 Dec 1999
Online Last Active Today, 11:58 AM

Posts I've Made

In Topic: Convert std::string to WCHAR ?

Yesterday, 05:27 PM

You might be able to use mbstowcs() to do so. If you gave more information, like what platform you are using then a more confident answer could be given.

In Topic: A function of class that resets bool of class #more info inside

19 May 2013 - 06:29 AM

One option is when you create your buttons, stick a (smart) pointer to each button into a container. When you want to reset each button, iterate over the container and set each button state in that loop.

In Topic: [c++] non-recursive way to iterate tree

17 May 2013 - 09:49 AM

It's possible to get a one node per item deque implementation with a dynamic array containing pointers to the individual nodes, which gives you the constant time random access. Some standard library implementations have an N item per node implementation where N shrinks as sizeof(T) increases, which degenerates to N equals one after a point. IIRC, at least some versions of MSVC's standard library implementation work this way.

In Topic: Multi-lingual text?

16 May 2013 - 05:01 PM

wchar_t isn't portably UTF-16 or UTF-32, it's an implementation dependent type that is typically 16-bits on Windows and 32-bits on other platforms. My recommendation is to find a Unicode library and use it's typedefs for Unicode character sizes. I like ICU, but there are other ones available.

Also, it's not going to be as simple as finding a single font for all East Asian languages. Due to CJK unification certain characters that are represented by the same code point are rendered differently in different languages (or differently between traditional Chinese and simplified Chinese). So you'll end up wanting a different font for each East Asian language you want to support.

In Topic: C++ Streams versus C Standard I/O Streams

10 May 2013 - 08:14 AM

Given that the C file streams don't have a mechanism to replace the back end at all, I don't see why you think that not being able to predictably interact with the back end in the C++ streams would be a disadvantage for C++ streams. It seems extremely illogical to state that product A is inferior to product B because product A won't let you do something that you can't do with product B.

PARTNERS