Tool to run C program, on Windows, with input in terminal

Tool is for Windows, it allows to run compiled C/C++ program in new console window. Text input will work in this console.

Example C++ program:

  1. #include <stdio.h>
  2. int main ()
  3. {
  4. int c;
  5. puts ("Enter text. Include a dot ('.') in a sentence to exit:");
  6. do {
  7. c=getchar();
  8. putchar (c);
  9. } while (c != '.');
  10. return 0;
  11. }

Tool props:

  • Name: C - run
  • File name: cmd
  • Shell command: unchecked
  • Parameters: /K "{FileNameNoExt}.exe"
    • Alternative value: /C "{FileNameNoExt}.exe" && pause
  • Initial folder: {FileDir}
  • Lexers: C,C++
  • Capture output: Ignore
  • Encoding: utf_8
  • Pattern: (empty)