Should I finish the official tutorial here |
I am fairly sure Stroustrup's book will take you through from the very beginning, I mentioned the Reference, Tutorial and Articles sections on this site as an additional material to look at. The reference section is good for looking at individual functions etc to see how they work.
What is simply wrong with most book that make them incompatible with the XCode compilers? |
It may not be because they are outdated or anything, the problems you describe would be encountered by almost anyone writing some code, using almost any compiler. The thing is that they are just poorly written in general. I guess the main one would the sheer naivety of how they write code, and general bad practice.
Yes, the code examples should work just fine.
Stroustrup does have his own std lib facilities header, which apparently just has a subset of the real thing, so obviously the code that comes from that won't be standard. However I am sure this is all explained thoroughly in the Book, and it won't harm your education to follow it.
Is 1 hour a day for 9 months usually enough to give me a sufficient knowledge on how to program and encode the common algorithms? |
Well coding is like anything else - the more practice you have, the better you will probably be. But it is obviously going to depend on how much you can remember, how much you might forget, how well you can understand the connections between things, how well you can apply something you have learnt to something else, what your best mode of learning is (actually doing it is best for most people, but different people learn best in different ways or a mixture thereof), and a bunch of other factors as well. And it's not just the language, there are other things such as design patterns, best practice ways of coding, all sort of clever techniques to do things well.
Beware that C++ is actually quite a big topic - some things that might seem to be pretty easy at first glance, can be quite involved in practice. For example, a class is a way of storing data and the functions that operate on that data into 1 concept. But in practice designing the best way of how multiple classes interact with each other is often not trivial at all.
And C++ is such a big topic - I reckon one could spend their entire working life doing C++, and not run out of things to learn - or things to do.
In terms of encoding common algorithms, C++ comes with a thing called the Standard Template Library (STL) which is a collection of classes, functions, containers, algorithms and uses Templates to tie them all together. So it won't be a case of having to encode algorithms, it's a case of learning
how to use them.
Having said that, teachers at school or Uni often get students to write their own algorithms and data structures, so they learn in detail how these things work. So a student might be asked to write their own code to sort something, or implement a linked list for example, even though
std::sort
and
std::list<>
already exist in the STL.