jupyter-xeus / xeus-cling

Jupyter kernel for the C++ programming language
BSD 3-Clause "New" or "Revised" License
3.02k stars 292 forks source link

cannot input data #439

Open hugochinese opened 2 years ago

hugochinese commented 2 years ago

Code

%%file main.cpp

include \<iostream>

int main(){ std::cout << "Hello world" << std::endl; std::string s; std::getline(std::cin, s); std::cout << s << std::endl; }

output

Overwriting main.cpp

execution

!g++ -o main main.cpp ! ./main

output

Hello world

problem

It does not provide a box for input a string

adamkhalaf commented 2 years ago

Same issue here. Have you found a solution yet?

WesFrank commented 9 months ago

@hugochinese The %%file directive is used to write files. Just run a cell without the %%file directive and call your main () function. It will work as expected.

shubha987 commented 5 months ago

Screenshot 2024-01-24 012453 its not working please look into it