Add pure random generator

This commit is contained in:
Robin Dietzel 2023-11-09 20:23:10 +01:00
parent 87dc5c0f49
commit a818b9af66

View File

@ -25,8 +25,18 @@ int main(int argc, char *argv[]) {
parser.process(app); parser.process(app);
const QStringList args = parser.positionalArguments(); const QStringList args = parser.positionalArguments();
if(args.length() != 2) {
parser.showHelp(-1);
}
const QString dest = args.at(0); const QString dest = args.at(0);
const int pow_value = args.at(1).toInt(); bool convOK;
const int pow_value = args.at(1).toInt(&convOK);
if(!convOK) {
parser.showHelp(-1);
}
const int num_values = std::pow(10, pow_value); const int num_values = std::pow(10, pow_value);
QTextStream print(stdout); QTextStream print(stdout);