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

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

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
  • Variant for xterm:
    • File name: xterm
    • Parameters: -hold -e "./{FileNameNoExt}"
  • Variant for gnome-terminal:
    • File name: gnome-terminal
    • Parameters: — bash -c "./{FileNameNoExt}; read -s -n1 -r -p 'Press any key… '; echo"
  • Shell command: unchecked
  • Initial folder: {FileDir}
  • Lexers: C,C++
  • Capture output: Ignore
  • Encoding: utf_8
  • Pattern: (empty)