Is it possible to run C++ and Python code in the same Jupyter notebook

Viewed 1593

Is it possible to run C++ and Python code in the same Jupyter notebook?

I've taught myself R using Jupyter notebooks where I would first solve a coding problem in Python and then write a similar solution in R. Having the code blocks right below each other helped me keep my skills sharp in Python, while learning a new language at the same time.

I now want to teach myself C++ with the same approach.

1 Answers

Frankly, if you wanted to learn C++, I would encourage you to use an IDE with full-fledged support for C++ like Microsoft Visual Studio or Visual Studio Code, or Code::Blocks, among many others:

All of the above options support good compilers, debuggers and on-line C++ documentation (including Intellisense). You'd probably be doing a disservice to yourself if you chose an IDE that didn't have these features.

However, I believe you CAN run C++ (at least some versions, to some extent) from Jupyter:

Related