Here's some code below. I want to spit out 'query' to the screen so I can check it. I don't have a fancy debugger installed yet like I am used to using on Windows7. Nor am I familiar with Linux programming very well yet. That's why I ask so many questions:
int outputToImport(const char* tbl_name, const char* output, mysqlpp:

onnection* pconn) {
std::ostringstream query;
query << "TRUNCATE TABLE " << tbl_name;
printf(query);<----- ????????????????????????
}
I just tried
std::cout << query << std::endl;
and got:
0x43143124312
I also tried this:
some hex output to my screen. That's not it.
---------- Post added at 10:32 PM ---------- Previous post was at 09:53 PM ----------
I also tried this and get a segmentation fault:
#include </usr/include/mysql++/mysql++.h>
#include <stdio.h>
#include <iostream>
#include <sstream>
#include <string.h>
using namespace std;
int outputToImport(const char* tbl_name, const char* output, mysqlpp:

onnection* pconn) {
char* query;
strcpy(query,"TRUNCATE TABLE ");
std::cout << query << std::endl;
}
int main()
{
mysqlpp:

onnection conn(false);
if (conn.connect("dsgsports","127.0.0.1" , "root", "")) {
printf("Connected to database.\n");
}
else {
printf("Failed to connect to database.");
return 1;
}
outputToImport("aa","aa", &conn);
return 0;
}