Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The STL has some core concepts to it. Boost builds on and expands on them. If you understand them, then moving right on to Boost may be of use to you. If not, I would start with the STL.</p> <ul> <li>The distinction between the various container types (sequences like <code>vector</code>, <code>list</code> and <code>deque</code>, and associations like <code>map</code>, <code>set</code> and their <code>multi*</code> and <code>unordered_*</code> varieties). Sometimes you can swap one for the other -- sometimes you can't. Know their strengths and their limits.</li> <li>The role of iterators, and how they provide a bridge between containers and algorithms. (This one I find I use over and over).</li> <li>Why there are standard algorithms: they are often tiny amounts of code, so it may not be obvious why they exist. Learn which containers they work with, and how to specialize them for particular cases (for example see how generic <code>copy</code> differs from <code>copy</code> specialized for <code>const char *</code>).</li> <li>How and when traits classes are used.</li> <li>How to use binders (<code>bind1st</code>, <code>ptr_fun</code> and <code>mem_fun</code>): the syntax can obscure their utility.</li> <li>How to use <code>string</code> -- and when <em>not</em> to use it. (All string classes have tradeoffs: learning the pros and cons of the standard one is educational).</li> <li>The difference between streams and streambufs: how to use the former to do formatted I/O (try reading a string from a stream: it's not as straightforward as it should be), and the latter to do low-level fast I/O.</li> </ul> <p>The principles used to design the STL are built upon and expanded on by the Boost libraries. If you get them, Boost is manageable. If you don't, and Boost ends up hard to follow, you can go back to the STL to get your bearings.</p> <p>(In general Boost really pushes the boundaries of the language. If you decide you want to really push your own knowledge of C++, and test if you really know what you think you know then it can provide an interesting challenge. I've used C++ for more than a dozen years, have taught other people how to use it, have acquired proficiency in many more high-level languages since then and Boost still surprises me. It's <em>very</em> useful, but its not trivial).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload