My code stops running at the cin statement (VSCode Code Runner EXT)

  c++, visual-studio-code, vscode-code-runner

Whenever I try to use this extension to automatically run code for me, it stops at the std::cin statement and doesn’t let me input anything. For example:

#include <iostream>

int main() {
    int num;
    std::cout << "Enter a number: ";
    std::cin >> num;
    std::cout << num*5;
}

This code runs up until the std::cin statement and doesn’t let me input anything in the console or terminal.

Source: Windows Questions C++

LEAVE A COMMENT