POV-Ray : Newsgroups : povray.off-topic : Teach yourself C++ in 21 days : Re: Teach yourself C++ in 21 days Server Time
29 Jul 2024 04:31:14 EDT (-0400)
  Re: Teach yourself C++ in 21 days  
From: Warp
Date: 14 Apr 2012 13:41:31
Message: <4f89b6cb@news.povray.org>
Orchid Win7 v1 <voi### [at] devnull> wrote:
> Sure, maybe you could learn BBC BASIC in 21 days. But C++? I doubt it.

  It depends on the depth of your C++ understanding that you want to
achieve.

  Certainly things like dynamic allocation, pointers (including their
triple role as pointers to individual values, pointers to arrays, and
iterators, not to talk about function and method pointers), pointer
arithmetic, const correctness, the so-called "rule of three" (which with
the new C++ is actually the "rule of five"), RAII, stack vs. heap
allocation, templates, the standard library and its usage, as well as
all the things you have to know in order to avoid shooting yourself in
the foot will take significantly more than 21 days to master.

  This is not even going as far as including more advanced low-level
stuff such as virtual inheritance, placement-new, bitfields and
template metaprogramming.

  OTOH, you can learn to make simple (and safe, although not necessarily
efficient) programs in that time, with the proper teacher.

> Riiiight. So, let's see, on day #6 you start writing and using classes - 
> a fairly advanced topic.

  Not really. Classes are the most basic element of OO programming (and
also the most intuitive part), so IMO they should be taught on the *first*
day. (This does not include inheritance and dynamic binding, though. That
can wait.)

> Oh, look. Day #12, you learn about inheritance, and the next day you 
> learn about /arrays/?

  Inheritance is much less useful than people thought 20 years ago
(it still has its uses in *some* situations, but much less than predicted).

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.