Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

I am started to learn C++ using as IDLE Clion of jetbrain company. Normally using the IDLE of Python (i.e., Pycharm of Jetbrain) or R project i am able to execute selection in console line-by-line my code and understand all variables. Is it possible in C++ or i need to compile everytime?

share|improve this question

closed as unclear what you're asking by Snowman, gnat, MichaelT, durron597, GlenH7 Jul 7 at 13:37

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

1  
recommended reading: Why is “Is it possible to…” a poorly worded question? –  gnat Jul 6 at 4:57

1 Answer 1

up vote 2 down vote accepted

What you are looking for is called a REPL, a quick search for "C++ REPL" gets you to Cling, but I have not used it.

I'm not sure what is the real benefit from using a REPL over to use a debugger with an interface that you are comfortable with. Static typing should help you get the code right before ever running it, also IDE's suggestions become much better than on 'duck typed' languages.

share|improve this answer
3  
Use of REPL is very common in interactive data analysis where the insight into data and statistics is the main goal, and the program (code) itself is merely a means of invoking toolbox functions. One requirement of using REPL in data analysis is that the code can be modified and re-executed without having to save all in-memory data (workspace) into disk and then reload them for use with the modified code. Apparently, if one modifies the definition of data structure, this will be hard to accomplish. Therefore, data analysis encourages the use of simple, flat data structures such as matrices. –  rwong Jul 6 at 4:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.