Skip to the content of the web site.

Lesson 312: Built-in complex number types

Previous lesson Next lesson


Up to now, every time we wanted to write a data structure or class that could be used for multiple types, we used templates. In C, however, there are no templates, so there are essentially two choices:

  • for built-in types, it is possible to use macros,
  • while for other types, it is possible to use a data structure storing void pointer.

Previous lesson Next lesson