The problem is that the example you linked is not a plain C++. It's an example for IBM's embedded SQL in C++, which requires some preprocessing with IBM-provided tools before feeding it into a compiler or standard C++ IDE which does not know about embedded SQL (like Dev C++). Quoting the link (emphasis mine):
Building embedded SQL applications involves two prerequisite steps
prior to application compilation and linking.
Preparing the source files containing embedded SQL statements using the DB2 precompiler.
The PREP (PRECOMPILE) command is used to invoke the DB2 precompiler, which reads your source code, parses and converts the
embedded SQL statements to DB2 run-time services API calls, and
finally writes the output to a new modified source file. The
precompiler produces access plans for the SQL statements, which are
stored together as a package within the database.
Binding the statements in the application to the target database.
Binding is done by default during precompilation (the PREP command). If binding is to be deferred (for example, running the BIND
command later), then the BINDFILE option needs to be specified at PREP
time in order for a bind file to be generated.
Once you have precompiled and bound your embedded SQL application, it
is ready to be compiled and linked using the host language-specific
development tools.
So you have to pre-process the example with some IBM's tool (presumably called PREP
) and only after that you will get a valid C++ code. I'm not sure if it's easy or possible to make Dev C++ use that automatically.