Today I finished my work on a somehow special exam. Our grade of the course taught by Dr. Zoltán Porkoláb would be calculated by a C++-programme. We had one week to write a header file that is included in that programme.
The main goal was to implement a priority queue for a hospital. A must-have was to use templates to implement the so called pqueue. We were free to decide whether to use the Standard Template Library or not. My implementation uses the STL, though there’s a lot of understanding necessary. Anyway it is a lot easier than writing the data structures (like a list, vector, map, …) by hand.
Frankly, I had a lot to learn to write that programme, since I’m quite new to C++ and templating. But it’s done now, and I’m glad and relieved I’ve made it that far.

0 Responses to “Metaprogramming in C++”
Leave a Reply