Sublime Text with console input for c++ programs

Viewed 9680

How can I use console input in SublimeText 2.0.1? I'v chosen "Tools -> Build System -> C++", and add hello.cpp file to the project:

#include <iostream>
int main() 
{
    int a, b, c;
    std::cout << "Enter: ";
    std::cin >> a >> b;
    c = a + b;
    std::cout << a << '+' << b << '=' << c << std::endl;
    return 0;
}

Build successful, but when I run ("Tools->Run"), the line "std::cin >> a >> b;" is passed and I can't enter the values. In terminal with g++ it run well. OS: Ubuntu 12.04

2 Answers
Related