tags:

views:

94

answers:

1

Hello all. I've just installed Qt Creator 1.3.0 in Ubuntu 9.10. I want to use Qt Creator 1.3.0 to develop simple console applications like this:

#include <iostream>
using namespace std;

int main()
{
    int n, m;

    cout << "Enter numbers: ";

    cin >> n >> m;
    cout << n << " " << m;

    return 0;
}

It compile. When I run it, program prints "Enter numbers: ". I enter two numbers separated with space in Application Output, but application don't react on any number.

Plz, help me. How to use standard C++ console input in Qt Creator? I've tried to use 'Run in terminal' option, but it doesn't help.

+1  A: 

The application output windows that you are probably referring to is exactly that, i.e. it does not allow any input. For console applications to allow input you need to check 'Run in terminal', which should open xterm.

If it does not or you want a different terminal emulator to be used, check the terminal settings in Options -> General.

danimo