I used ResUse as the result type and printed rows in a while loop, but when
I used this method in a class member function, it would abort after printing
the lines, the codes in the function are:
mysqlpp::Query query = con.query();
mysqlpp::ResUse res;
mysqlpp::Row row;
query << "select * from db_entry";
res = query.use();
while (row = res.fetch_row()) {
std::cout << row["id"] << std::endl;
}
but it didn't abort if I just put them in main() without using class. Am I
missing any important thing?
--
Dell Inspiron 600m
Pentium-M 1.6G
512MB, 60G
ATI 9000 Mobility