Theres a C way, then a C++ way, now a c++11 way, then the boost way, etc. etc. At what point should a beginner go? |
If you want to get into commerical development then you need to gain some familiarity with all the approaches. The ideal way will not always available, so you cannot just know the one, best way to do something.
For example, I have worked on legacy codebases which are still using Visual C++ 6.0 and Visual C++ 2005. In the first case there was no way time and money was going to be spent on porting the code to build with newer tools; but it needed the occasional bug fix and extension. In the latter case it was licensed 3rd party libraries which used C++ linkage which made the move problematic. So you'd be struggling if you only knew the C++11 way.
I also come across C libraries regularly, so need to know the C, too (though I still find it very clunky.)
why would you make your own? |
When working as a commercial developer, or on open source or your own actual projects, you should always use the appropriate library whenever possible.
But for educational reasons, it is a good idea to reinvent the wheel. It's a way to learn about the language, and can even help you understand how the libraries work (e.g. implement your own version of an standard container, without looking at the real code.)
It can also help you understand the language by implementing functionaility in different ways, to help you understand how things fit together.
Of course you should do this in a knowing way, also finding out what the appropriate library solutions are.
Andy