Regardless of how hard/long it is, has anybody ever used C or C++ for web development?
Yes they have (and apparently some still do, though I can't name them off the top of my head...been a while since I heard about it).
Used to be possible by writing something that hooked in to isapi.dll (in IIS) and handled raw HTTP requests. I'm guessing Apache has a module that can handle it as well.
Good times...
At least on Apache / Linux environments, it's possible to use any file that can be executed as a CGI script. I've used C++ for one tiny shareware keygenerator script many years ago, but only because I already had the source in C++ and no knowledge of better suited programming languages.
I guess it would even be possible to use shell scripts for that purpose.
It makes little sense these days though. On database-driven websites, the SQL commands take usually much more resources than the program code. Therefore it would seldom make sense to use C++ over languages with much better support for web development, like C# / .NET.
You might want to see this question
http://stackoverflow.com/questions/746309/which-is-the-best-c-web-framework
The smart-ass answer: almost all web development is done in C or C++. It's just that C or C++ is a layer in the stack, and not the topmost layer. .NET, Java, Ruby, Python, PHP - all the most prominent runtime execution engines for these languages are written in C or C++.
If you were in the pre-historic age of web development, you'd do a lot of web development in C++.
There was a time when dynamic content was channeled through CGI scripts and a lot of scripting jobs were handled through C++ based executables.
Later it was possible to patch into the inner workings of HTTP and handle data any-which-way you want by writing an ISAPI DLL (which classic ASP was).
So yes, web development has been and will be done in C++.
It still goes on -- You only have to look at the web offering for products like Crystal Reports that are written in C++,but it's on the fine line of being the framework itself, rather than actual "web development".