Hi Lesiok, then I have to write code that is
#include <QCoreApplication>
#include <iostream>
#include "geometria.h"
using namespace std;
using namespace Geometria;
int main(int argc, char *argv[])
{
float ris = Norma(3);
cout << "Il risultato è: " << ris << endl;
return 0;
}
#include <QCoreApplication>
#include <iostream>
#include "geometria.h"
using namespace std;
using namespace Geometria;
int main(int argc, char *argv[])
{
float ris = Norma(3);
cout << "Il risultato è: " << ris << endl;
return 0;
}
To copy to clipboard, switch view to plain text mode
However, doing so by booting from dos shell prompt does not display anything I.
how do I do?
Added after 51 minutes:
The really strange thing is that using the following code to main.cpp (geometria.h and leaving unchanged):
#include <QCoreApplication>
#include <iostream>
#include "geometria.h"
using namespace std;
using namespace Geometria;
int main(int argc, char *argv[])
{
float ris = Norma(3);
cout << "Il valore e': " << ris << endl;
return a.exec();
}
#include <QCoreApplication>
#include <iostream>
#include "geometria.h"
using namespace std;
using namespace Geometria;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
float ris = Norma(3);
cout << "Il valore e': " << ris << endl;
return a.exec();
}
To copy to clipboard, switch view to plain text mode
using the wizard to create a console project in Qt, so it works perfectly, but if I create a project wizard to empty and fill it with files main.cpp and geometria.h seen above does not work, in the sense that it makes me see nothing in the dos shell prompt.
Another thing I never understood is why the projects console shell prompt dos never close yourself but you have to do CTRL-C to terminate.
Can anyone give me the answers to that?
Bookmarks