int main() { Deck d; bool _running; do { // if there are no connection then exit if (PQstatus(d.GetConnection()) == CONNECTION_BAD) { return 0; } d.Show(); _running = d.Menu(); } while (_running); system("pause"); return 0; }