gvanto
February 19th, 2009, 10:22 AM
I am following the first example on here: http://tangentsoft.net/mysql++/doc/html/userman/tutorial.html
on using the MySQL++ feature (which seems pretty powerful, i like its ability to access fields within result sets associatively)
My program has the header files included and the mysqlpp namespace is recongized, however when trying to create a query, the avaiable method in connection, takes void as argument ??
So I cant create a query right now, very frustrating :-(
I installed the following 2 packages on Kubuntu (Hardy):
i libmysql++-dev - mysql C++ library bindings (development)
i libmysql++2c2a - mysql C++ library bindings (runtime)
Help would be greatly appreciated,
gvanto
mySQL++ newbie
/*
* testmain.cpp
*
* Created on: 15/02/2009
* Author: pacific
*/
#include <iostream>
#include <cstdlib>
#include <stdio.h>
#include <string>
#include <stdlib.h>
#include "mysql++/mysql++.h"
#include "mysql++/query.h"
#include <mysql.h>
#define DO_MAIN 1
using namespace std;
#ifdef DO_MAIN
int main(int argc, char *argv[]) {
mysqlpp::Connection conn(false);
mysqlpp::Query query = conn.query("select * from stock"); //query(void) is the only available method here ! ? !
return 0;
}
#endif
on using the MySQL++ feature (which seems pretty powerful, i like its ability to access fields within result sets associatively)
My program has the header files included and the mysqlpp namespace is recongized, however when trying to create a query, the avaiable method in connection, takes void as argument ??
So I cant create a query right now, very frustrating :-(
I installed the following 2 packages on Kubuntu (Hardy):
i libmysql++-dev - mysql C++ library bindings (development)
i libmysql++2c2a - mysql C++ library bindings (runtime)
Help would be greatly appreciated,
gvanto
mySQL++ newbie
/*
* testmain.cpp
*
* Created on: 15/02/2009
* Author: pacific
*/
#include <iostream>
#include <cstdlib>
#include <stdio.h>
#include <string>
#include <stdlib.h>
#include "mysql++/mysql++.h"
#include "mysql++/query.h"
#include <mysql.h>
#define DO_MAIN 1
using namespace std;
#ifdef DO_MAIN
int main(int argc, char *argv[]) {
mysqlpp::Connection conn(false);
mysqlpp::Query query = conn.query("select * from stock"); //query(void) is the only available method here ! ? !
return 0;
}
#endif