I recently started working my way through the C++ Primer after years of avoiding C++ and its reputation for complexity. My first impression is that it has actually matured into quite a nice language which strikes a balance between simplicity and programmer power which just isn't all that bad, especially given its genesis.<p>There are some annoyances for sure -- lots of mentions of "subtle" differences in how certain concepts work are already cropping up in introductory chapters. I'm sure there's some reason that "auto" discards top-level qualifiers while "decltype" does not, but trying to ingrain so many of those distinctions is a pain.<p>I'm also glad to have learned both Java and C before trying C++. The former so that I know some OO mistakes to avoid (I would <i>not</i> want to discover the pain of over-enthusiastic use of generics while knee deep in compiler template errors), and the latter because learning manual memory management and the stack/heap distinction is enough of a cognitive load without layering all of C++'s extra features on top. It's also good to have a bit deeper understanding of what's <i>really</i> going on with the memory and pointers under the hood, before handing over control to automatic resource management and smart pointers and such.
An essential companion to the consolidated C++ FAQ is the indispensable C++ FQA.<p><a href="http://yosefk.com/c++fqa/" rel="nofollow">http://yosefk.com/c++fqa/</a>
Communities like Node, Python, RoR, and even iOS (obj-c) have benefited from a defacto centralized point of reference, and I think devs who come from those communities will find it easier to be more productive in C++ with something like this.<p>I always referred to Marshall Cline's FAQ as my reference point, but pulling together Bjarne's and StackOverflows FAQ's is a great step.
<p><pre><code> Until now, there have been several different overlapping FAQs, including notably:
Bjarne Stroustrup’s FAQ pages
Marshall Cline’s popular C++ FAQs Online
at least three different StackOverflow C++ FAQs in some form....
and many others
</code></pre>
What could be more apropos than multiple inheritance?
Marshall Cline’s C++ FAQ is really great. Good to see it will be merged into the new one.<p>Other resources I use regularly are:<p>* <a href="http://en.cppreference.com" rel="nofollow">http://en.cppreference.com</a><p>* <a href="http://www.cplusplus.com" rel="nofollow">http://www.cplusplus.com</a>
I enjoyed the wording of this question: "I’m from Missouri. Can you give me a simple reason why virtual functions (dynamic binding, dynamic polymorphism) and templates (static polymorphism) make a big difference?"
Did anyone else think of the XKCD comic on new standards?<p><a href="https://xkcd.com/927/" rel="nofollow">https://xkcd.com/927/</a>
I found the link to Stroustrup's "Learning Standard C++ as a New Language" [edit: from 1998, which explains why I found it kind of familiar to my late 90s run-in with c++...] interesting[2,1]. But then I tried to find out what's the current state of the art for idiomatic, cross-platform text processing (in unicode, probably utf-8) -- and got a little sad.<p>There's still no way to write a ten(ish) line c++ program that reads and writes text, that works both on the windows console, and under OS X/*bsd and Linux?<p>(Lets go crazy, say you have to implement a minimal cat, tac (reverses stdin on stdout) -- and also corresponding echo and ohce (I made that up, something that takes string(s) as input, and outputs the characters reversed (ie: "ohce olé there" outputs "ereht élo").<p>[2][edit] The direct link to Strostrup's paper is:<p><a href="http://stroustrup.com/new_learning.pdf" rel="nofollow">http://stroustrup.com/new_learning.pdf</a><p>code:<p><a href="http://isocpp.org/wiki/faq/newbie#simple-program" rel="nofollow">http://isocpp.org/wiki/faq/newbie#simple-program</a><p>[1]<p>The FAQ briefly touches on Unicode, but it doesn't seem very helpful (to me):
<a href="http://isocpp.org/wiki/faq/cpp11-language-misc" rel="nofollow">http://isocpp.org/wiki/faq/cpp11-language-misc</a>
(search page for unicode)<p>Trying to look for a (simple, generally accepted) solution, I came across:<p><a href="http://www.utf8everywhere.org/" rel="nofollow">http://www.utf8everywhere.org/</a> (If I'm reading this right, it says assume std::string is utf8, but I'm not sure if there are std-lib funtions for doing stuff like getting the index of a glyph, and reversing strings by glyph? And will they work on windows?)<p><a href="http://stackoverflow.com/questions/2037765/what-is-the-optimal-multiplatform-way-of-dealing-with-unicode-strings-under-c" rel="nofollow">http://stackoverflow.com/questions/2037765/what-is-the-optim...</a><p>Which points to: <a href="http://utfcpp.sourceforge.net/" rel="nofollow">http://utfcpp.sourceforge.net/</a> which is the best I'm aware of so far.<p><a href="http://stackoverflow.com/questions/8513249/handling-utf-8-in-c" rel="nofollow">http://stackoverflow.com/questions/8513249/handling-utf-8-in...</a><p><a href="http://stackoverflow.com/questions/402283/stdwstring-vs-stdstring" rel="nofollow">http://stackoverflow.com/questions/402283/stdwstring-vs-stds...</a><p>(Suggest using wstring on Windows and string on Linux -- for simple programs that would effectively mean write to versions, one for each platform ..)