12-11-2012
1,
0
Join Date: Dec 2012
Last Activity: 18 December 2012, 1:50 AM EST
Posts: 1
Thanks Given: 0
Thanked 0 Times in 0 Posts
Mysql++
code:
#include <mysql/mysql.h>
#include <my_global.h>
int main(int argc, char **argv)
{
MYSQL *conn;
conn = mysql_init(NULL);
mysql_real_connect(conn, "localhost", "zetcode", "passwd", "testdb", 0, NULL, 0);
mysql_query(conn, "use vobd_db");
mysql_query(conn, "select * from obd_call_status limit 10");
result = mysql_store_result(conn);
mysql_close(conn);
}
output :
mysql.c:2:23: error: my_global.h: No such file or directory
mysql.c: In function âint main(int, char**)â:
mysql.c:8: error: âNULLâ was not declared in this scope
mysql.c:15: error: âresultâ was not declared in this scope
can anyone wana try removing the errors