News for hackers. Stuff that matters.
Re:Sizeof(char) is 1 by Ayjay on Monday September 06, 2010 @02:54AM (#1666113)
Really, a better coding style is to use STL strings, containers and algorithms and never get down to the point where you have to care.

Coding at the bare-metal level is a very slow, tedious, error-prone and silly way to code unless you're doing, or have some external constraint that forces you to (and, no, efficiency isn't usually a reason not to use C++ or the STL, it almost always compiles to the same as using strcpy's and malloc's.)

-- Ayjay on Fedang/coding

Re:Sizeof(char) is 1 by billforsternz on Monday September 06, 2010 @03:35AM (#1666168)
The man is writing about C, not C++. C remains important. I agree that C++ and the STL are good toolsI don't agree that STL style string handling code will compile down to the same thing as C style string handling code.