C++ (Qt)int main(int argc, char *argv[]){ QApplication a(argc, argv); QStringList arguments = qApp->arguments(); if (arguments.count() == 1 || arguments.contains("gui")) { RClientDialog *w = new RClientDialog; w->show(); return a.exec(); } else { arguments.removeFirst(); Console console(arguments); console.output("Work done!"); return 0; }}