Metaprogramming in C++

November 17, 2005 — Leave a comment

Today I finished my work on a somehow special exam. Our grade of the course taught by [Dr. Zoltán Porkoláb](http://gsd.web.elte.hu/) 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](http://aszt.inf.elte.hu/~gsd/klagenfurt/porkolab.html) 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](http://www.sgi.com/tech/stl/) 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.

No Comments

Be the first to start the conversation!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s