Tomasz
21st November 2010, 16:43
Hello!
I've got simple console application and I've got some questions.
#include <QtCore/QCoreApplication>
#include <QTextStream>
QString temp;
int main(int argc, char *argv[])
{
QTextStream out(stdout);
temp = "test";
QCoreApplication a(argc, argv);
out << temp << endl;
return a.exec();
}
First - is the order of code correct? Where should be "QCoreApplication a(argc, argv);"? As i assume "return a.exec();" should be at the end?
What about exiting the application? When I run it in console, it works all the time - don't exits.
thanks in advance
best regards
Tomasz
I've got simple console application and I've got some questions.
#include <QtCore/QCoreApplication>
#include <QTextStream>
QString temp;
int main(int argc, char *argv[])
{
QTextStream out(stdout);
temp = "test";
QCoreApplication a(argc, argv);
out << temp << endl;
return a.exec();
}
First - is the order of code correct? Where should be "QCoreApplication a(argc, argv);"? As i assume "return a.exec();" should be at the end?
What about exiting the application? When I run it in console, it works all the time - don't exits.
thanks in advance
best regards
Tomasz