C++ From Scratch: Class Templates

preview_player
Показать описание
In this video we learn about the basics of class templates C++!

Рекомендации по теме
Комментарии
Автор

Is it a good idea to use make_unique in the initializer list of the constructor?

RD-fbei
Автор

Hi Nick, thank you for your great lessons. I have a question: is it possible to see the source code automatically made by the GNU preprocessor for your dynamic array of integers and for the one of doubles? It may be useful to read their specialized code for debug purpose. Thanks in advance for your answer. Cheers, Simone

simonepernice
Автор

Did you know that with C11 you can do templates in C? It's weird, but you should play around with it. Back when I first started programming I did a lot of experimentation with macros, and if this feature had been there back then, I might have had usable code in all that mess. For that matter, I might never have learned C++. Although C++'s templates are far better, it's still cool that they added this to C.

anon_y_mousse