running mysql++ examples

Started by
0 comments, last by pulpfist 15 years, 12 months ago
I'm trying to run the examples (simple1 and resetdb) that come with mysql++ but when I start it, it just flashes. Just like when you make a simple console app and you forget cin.get(); at the end only difference is that putting cin.get(); at the end doesn't fix te problem. code: http://codedump.mastercode.nl/474/.
Advertisement
There is a couple of places your program quits without giving a message, like here:
if (!parse_command_line(argc, argv, &db, &server, &user, &pass)) {		return 1;	}


If you print a message to cerr before returning you will at least find out where the program exits.

Also, you can remove the call to parse_command_line all together since you have hardcoded the parameters to connect anyway. Maybe that will get you a step futher.

This topic is closed to new replies.

Advertisement