All C++ code generated by CGI++ must be linked against libcgi++. In this library there are some routines that you may find useful:
writes cgi encoded value of s into os
writes s properly quoted for SQL insert into the current stream . Use only in embedded C++ expressions, otherwise the results are unpredictable. Example of proper use:
char* name = "bobo o'reilly";
int id = 3;
SQL_DO("insert into student($id$, '$sql_quote(name)$")
The return value is a pointer to an empty string. It is needed only to
make the streams happy. This is a trace of a hack, for which I appologize
to the lovers of C++ purity. If you can think of a better way to implement
the syntax of $sql_quote(s)$ without hurting performance and causing
memory leaks, feel free to suggest it, or better, do it and
send me a patch.
Same as the one above, except the parameter type is const string&