On Wed, Apr 19, 2017 at 11:34 AM, Greg Keogh <gfke...@gmail.com> wrote:

> Haven't used printf or scanf (or their friends) in ages.
>>
>
> They were the first things to be highlighted when I compiled my old source
> for the first time.
>


Not much of that around for windows code now


> I also wanted Unicode support like we're used to with the managed String
> class, but I wasn't sure what the latest C++ convention was for this. I
> went searching and came across conflicting information. Some recommended
> the STL string, some pointed to safe replacements for all the old
> dangerous 'str' functions, then I found various macros like U("") for
> defining Unicode strings. At this point I became irritable and didn't know
> what to do.
>
> Have you got a convention for defining and manipulating strings in your
> C++ code? Is there a reasonably widespread convention at all?!
>
>
We went thru and converted it all to L"something" where it was embedded
(and we minimise that, as it's freaking hard to regionalise that way) and
if we manipulate raw strings with C++ we use the safe forms of strcat -
compile with warnings as errors points out the ones you miss.  Most of our
string stuff, though, has a internal string class that wraps the boost
stuff.  And includes toAscii and vice versa stuff.  BOMs on files can be
annoying.




> *GK*
>



-- 
Meski

 http://courteous.ly/aAOZcv

"Going to Starbucks for coffee is like going to prison for sex. Sure,
you'll get it, but it's going to be rough" - Adam Hills

Reply via email to