Yes, you can use CGI. This means that your code runs on the server of course. Personally I think it would be much better to use a scripting language such a Perl, BASH or PHP. But this depends what you want to do and how much C++ you know. Also if you are interested in CGI this may also be helpful.