Well I was wondering if there is any extension for a web server which allows me to “script” in C++ instead of a scripting language like php?
some pseudo code:
#include <iostream>
cout << "<html><title>this is a webpage</title></html>";
I know this sounds silly but I am really wondering if such thing exists.
Or maybe there is something that allows to run compiled C++ code as a webpage from a web server?
Well, as said in comments you can do what you want using CGI. If your need is to make a webapp using c++, WT is probably the framework you want :
http://www.webtoolkit.eu/wt