Skip to main content
9 events
when toggle format what by license comment
Mar 5, 2011 at 0:02 comment added Martin Beckett @Ernelli - you're forgetting wchar_t and std::wstring and them meaning different things on Windows/Unix
Mar 4, 2011 at 20:42 history made wiki Post Made Community Wiki
Jan 16, 2011 at 20:28 comment added user8709 @Gabe - good point. For example, doing a template in-place reverse with a policy parameter would either be not very general, or (probably the policy rather the function) quite complex, when it comes to variable-bytes-per-character strings. I don't know whether no-premature-optimisation (create a new string because it's easier to be general) or agility (don't worry about that case until it happens, and the in-place reverse is no harder, maybe a tad easier, for fixed-width-character strings) would win out.
Jan 9, 2011 at 17:27 comment added IAdapter c'mon, c++ is all about quiz! how much memory would integer take if he was spying on char* and UTF-8? Oh yeah, hes unchecked! It sounds like c++ question.
Dec 14, 2010 at 15:02 comment added Steven Evers @Ernelli: C++ never really took off? Seriously?
Dec 14, 2010 at 11:58 comment added Ernelli Hm, by simply chosing between CString, char*, std::string, etc one would quickly understand why C++ never really took off.
Dec 13, 2010 at 6:03 comment added Gabe Even something as simple as "write a function to reverse a string" can tell you a lot about an expert programmer: do they use CString, char*, std::string, etc.; do they return a new string or reverse in place; do they manually loop over the characters or do they call a library function. And of course if they can't do something simple like reverse a string, that also tells you a lot about them! There are also lots of follow-up questions, like does it work with Unicode, does it work with UTF-8, etc.
Dec 13, 2010 at 5:36 comment added chrisaycock Agreed. Don't ask about syntax that can be looked-up on Google. Instead, have the candidate write an easy (though not trivial) function, preferably something that you've written in your own code at one point.
Dec 12, 2010 at 22:05 history answered Steven Evers CC BY-SA 2.5