#include #include using namespace std; using namespace rude; int main(void) { // You may want to change these variables // string username=""; string password=""; string database="mysql"; string server="localhost"; int port=3306; Database::addContext("mycontext", database.c_str(), username.c_str(), password.c_str(), server.c_str(), port); Database *db = Database::instance("mycontext"); string sql="SHOW TABLES"; if(db->storeResultQuery(sql.c_str())) { while(db->nextRow()) { cout << db->column(0) << "\n"; } } else { cerr << db->getError() << "\n"; } Database::finish(); return 0; }