I'm sure these are just c++ errors as opposed to anything mysql++
related - if so you should follow this up on a c++ list somewhere.
Error 1, exactly what it says on the tin, constructors can't return a
value of any type so just remove the "return -1;". Personally, I'd let
whatever instanciates DatabaseControl handle the exception (or at least
re-throw it), but otherwise making that change will correct the error.
I think error 2 is because "con" is a pointer, probably you need to use
con->query(). I think error 3 you're missing the header file for
mysqlpp::Connection.
Also, because you're shadowing the "con" member variable in the
constructor it is probably not allocated anywhere. Result: app will
probably crash when you call getCommands or DatabaseControl goes out of
scope :) Enjoy more, and turn on -Wshadow to have the compiler let you
know about it. Turn on -Wall for that matter :)
Joel

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.