Really dumb question but new to atom and i am not able to get input from user for my program. Please help!


Consider the following simplest C++ program :

int main() {
int x=0;
cout<<“Enter a value”;
cout<<"you entered "<<x;
return 0;

Running this using a package named script (link :

It just keeps waiting for my input but doesn’t show me any way to provide the input. What to do here? All I want is just run my cpp program.


To capture user input you essentially need full REPL (read-eval-print loop) support and it appears script does not have this yet:


Ohh… So are there any other packages to run/debug cpp programs?


I honestly have no idea, I don’t write C++. I did a quick search on for CPP, but I didn’t find anything that does what you are looking for. Perhaps a better keyword has more luck, or maybe someone else knows of a package that does this?


Yea i too found nothing… anyways thanks for helping!


I also found run-file. I don’t use it myself, though, so I don’t know if it supports stdin.

PS Oh, and it’s only for Linux


Yup saw that… Need something for mac! Thanks anyways. :slight_smile:


Is there any solution to this ?
I am facing the same problem, please tell.


You’re asking the same thing in two different threads. I’ve provided a response here. In the future, please pick just one thread to post in.


You can try the packages names"Hydrogen" which provides stdin