On Sat, Oct 8, 2011 at 11:59 AM, Jonathan Wakely <jwakely....@gmail.com> wrote: > On 8 October 2011 17:37, Charles Wilson wrote: >> >> Not hopeless; but you have to treat C++ simply as a slightly more >> expressive version of C, follow the same rules previously outlined just >> as if you WERE using C, and avoid the STL... > > If you're going to spout FUD about C++ at least use the right > terminology please. > > For a start "the STL" is a library from the 90s and what you probably > mean is "the C++ standard library" and secondly I assume you mean > avoid the standard containers such as std::vector, which allocate > memory. There's no reason to avoid using e.g. std::sort or > std::lower_bound on an array. >
My C++ is rusty but my understanding is that unlike C, it allows you to control allocation by redefining 'operator new' or supplying your own allocator. I would have concluded that if heap allocation was an issue, it was simpler to handle in C++ than C -- which does not provide standard way to take over dynamic allocation. But again, my C++ may not be up-to-date. -- Gaby