On 21 Jan, 00:45, Albert <albert.xtheunkno...@gmail.com> wrote:
Hello,
For coding contests I only have a solid knowledge of C. When problems
get hard, I won't have time to code up my own Andersson tree but will
have to use a binary search tree in the STL.
Is there a good tutorial on C++ you would recommend, covering especially
the STL, on the internet for C programmers? I need a solid understanding
of C++ programs that are the C++ version of the C counterpart (so I can
found out what I need to #include, what using namespace std means), and
don't need OOP *at all* (but I think the STL requires understanding of
OOP, I'm not sure).
Having made the transition from C to C++ *mindsets* over
the past few years, my experience is simple, if a bit
discouraging from your POV:
If you want to make the transition, be prepared to spend a
*lot* of time unlearning C and learning the C++ counterpart.
The problem is that C is a subset of C++, and the code might
at first glance look similar, which in turn might cause C
programmers to think the transition is a simple matter,
learning a couple of new libraries and/or keywords.
However, the ideas and mindsets behind C and C++ programs
are totally different. You don't need to go to OO at all to
see the difference: Templates and / or type-dependent argument
look-up in functions are more than enough to get you into
serious... if not trouble so at least cause you to write
seriously poor C++ programs.
If you do not want to spend the time on the transition, you
might be better off staying completely in the C world.