int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); QTextStream stream(stdin); //enter the file name QString UserFileName = stream.readLine(); // is it the correct method to get the file name from user in command line?? // if yes than how to add this value to argv[]?? QStringList args = app.arguments(); if (args.count() != 2) { std::cerr << "argument required" << endl; //return 1; } WorkerThread WThreadObj; WThreadObj.StartFileAnalysis(args[1]); //pass cmd 2nd argument return app.exec(); }
argc
argv
argv[0]
QCoreApplication
QStringList
char *
QApplication::arguments()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)