Thomas Jansen just published his PhD thesis on something cool : how to code shaders in C++ and embed them smoothly in a C++ program, without any modification of the complier !
The idea, samples and the full dissertation can be found here :
http://blog.beef.de/thesis/ I didn't find where to download the code yet ...
C++ is definitely a great language