  | | | Weird query issue | Weird query issue 2007-12-02 - By Michael Sullivan
Back Here's my code:
michael@(protected) ourrpg $ nl gameengine.h 1 #ifndef GAMEENGINE_H 2 #define GAMEENGINE_H 3 4 #include <mysql++.h> 5 6 using namespace mysqlpp; 7 class GameEngine 8 { 9 public: 10 GameEngine(); 11 ~GameEngine(); 12 13 private: 14 Connection con; 15 Query query; 16 Result res; 17 Row row; 18 19 20 }; 21 #endif michael@(protected) ourrpg $ nl gameengine.cpp 1 #include <mysql++.h> 2 #include "gameengine.h" 3 #include <iostream> 4 5 GameEngine::GameEngine() 6 { 7 con = Connection(false); 8 con.connect("RPG", "localhost", "rpguser", "ourrpg"); 9 query = con.query(); 10 } 11 12 GameEngine::~GameEngine() 13 { 14 } 15
I'm getting these errors:
gameengine.cpp: In constructor 'GameEngine::GameEngine()': gameengine.cpp:5: error: no matching function for call to 'mysqlpp::Query::Query()' /usr/local/include/mysql++/query.h:150: note: candidates are: mysqlpp::Query::Query(const mysqlpp::Query&) /usr/local/include/mysql++/query.h:141: note: mysqlpp::Query::Query(mysqlpp::Connection*, bool)
I took that query = con.query() directly from simple1.cpp, (which built successfully), so why isn't it working here?
-- MySQL++ Mailing List For list archives: http://lists.mysql.com/plusplus To unsubscribe: http://lists.mysql.com/plusplus?unsub=mysql@(protected)
|
|
 |