Hi, so I'm pretty new to QT and to C++ in general. I kind of have 2 questions, and they may be related, but the first is most important if it can be answered separately.

My QT was working fine for a while. I've been using it to program for my computer science course. All of a sudden, though, input seems to break my program. For example, I tested it by making this code:

#include <QtCore/QCoreApplication>
#include <iostream>
using namespace std;

int main(int argc, char *argv[])
QCoreApplication a(argc, argv);
int number = 1;
cout<<"Test "<<number<<endl;
cout<<endl<<endl<<endl<<"Test "<<number;
return a.exec();

It'll print the first "Test ", the number 1, ask for input, and then give the appropriate amount of line breaks. It won't print out the given number, though.

I've already gone to the projects/run menu and made sure that Run in Terminal was checked.

Which leads me to my second question. When I build/run my programs they run in the terminal in X11. How can I run them in the mac terminal, if possible? I tried changing the path to applications/utilities/terminal.app but it just froze the program and I would have to quit out.