|
RE: Compile Error/Code Issue: msg#00032db.mysql.c++
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 -- MySQL++ Mailing List For list archives: http://lists.mysql.com/plusplus To unsubscribe: http://lists.mysql.com/plusplus?unsub=gcdmc-plusplus@xxxxxxxxxxx |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Compile Error/Code Issue: 00032, Freyja |
|---|---|
| Next by Date: | Re: Problems with mysql and mysql++ examples: 00032, Warren Young |
| Previous by Thread: | Compile Error/Code Issuei: 00032, Freyja |
| Next by Thread: | Re: Compile Error/Code Issue: 00032, Freyja |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |