
C++
Programming Throwdown
00:00
Using C Plus Plus, You Can Get Areas With Inergers and Doubles
A lot of high level languages allow you to do something called templating. This allows you to write a function once if area is just, let's say, squares and rectangles. It doesn't matter what type they are then basicly allows you with a special syntax to define it. Yet, it's really interesting what the compiler actually does with templaes. It looks at all the times you use the class, and it creates that many copies of the class. But it does all this for you, like, behind the scenes. So you don't have to go through all the trouble of duplicating, copying and pasting all your own code.
Transcript
Play full episode