Check this line:
Stockauto* stockauto = new Stockauto(res->getInt(1),res->getInt(2), res->getDouble(3), res->getString(4), res->getInt(5));
As Richard pointed out,
res->getInt(2)
returns an
int
, and the
Stockauto
constructor expects a
Datum*
.
So either this is not the correct constructor, or your parameter is wrong.