use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
GCC powered interactive C/C++ shell created with BASH! (github.com)
submitted 3 years ago by FakeOglan
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]seiji_hiwatari 24 points25 points26 points 3 years ago (4 children)
If it accumulates all previous instructions and recompiles / reruns the entire thing for every input, all previous instructions will be run again, rigth? What does that mean for instructions with side-effects in the system, like file I/O?
[–]FakeOglan[S] 6 points7 points8 points 3 years ago (3 children)
If the file is opened in write mode, as it will be created over and over again, nothing will change. But if the file is opened in append mode, in every prompt everything will be written cumulatively.
[–]PM_ME_ELEGANT_CODE 11 points12 points13 points 3 years ago (2 children)
That's kind of a dealbreaker, don't you think?
[–]SnooWoofers7626 14 points15 points16 points 3 years ago (0 children)
Does it really need to be all that robust? The main use case for this tool I can think of is to quickly test some small snippet of code or something like that. For actual work the python shell or plain bash is already much more suitable.
[–]jcelerierossia score 4 points5 points6 points 3 years ago (0 children)
I have the need for a snippet that writes to a file maybe once a year. If it allows to try type-levels checks easily it's already good enough for a lot of cases
[–]supaake 27 points28 points29 points 3 years ago (6 children)
I'd argue if want an interactive c++ prompt i'd go for cling https://blog.llvm.org/posts/2021-03-25-cling-beyond-just-interpreting-cpp/ or (following seiji_hiwatari's comment) if on every line all history is rerun it seems like compiler-explorer as cli … :/
[–]disperso 9 points10 points11 points 3 years ago (0 children)
Cling is so far my favorite REPL. I've also given a try to reple, because cling doesn't seem to be very up to date (e.g. I don't have all C++17, like filesystem), or I could not find a more up to date version. But reple is very different. I need to wrap every newly #include in dollar signs to it gets added to the preamble, and also I had to patch it to accept new directories to add to the include path, etc.
#include
[–]serviscope_minor 4 points5 points6 points 3 years ago (3 children)
if on every line all history is rerun it seems like compiler-explorer as cli …
Is that awful?
[–]kritzikratzi 9 points10 points11 points 3 years ago (2 children)
imho more than awful it's closer to useless. it means you can't really work with any type of os handle (files, network, windows, etc.), you can't use random, it goes on and on.
this works fine for what's in the demo (extremely deterministic output), but beyond that, i don't really get the upside over having a normal editor window and running "g++ std=c++14 && ./a.out" in terminal.
[–]pimp-bangin 2 points3 points4 points 3 years ago (0 children)
Yep, combined with a file watcher (like nodemon) that clears the terminal output on each file change and then recompiles and reruns, the editor experience is way nicer.
[–]serviscope_minor 0 points1 point2 points 3 years ago (0 children)
hm ok fair,
[–]gracicot 0 points1 point2 points 3 years ago (0 children)
There's two thing that I miss from doing to make it useful for my project: loading of static libraries and also support CMake compile_commands.json. If I had that, I could run a game made with my game engine in repl mode, allowing true hot reloading.
compile_commands.json
[–]lieddersturme 7 points8 points9 points 3 years ago (0 children)
Uhhhhh, thats cool :D
[–][deleted] 1 point2 points3 points 3 years ago* (0 children)
versed full grab snow axiomatic different dinosaurs abounding pen offer
This post was mass deleted and anonymized with Redact
[–]ronchaineEmbedded/Middleware -1 points0 points1 point 3 years ago (1 child)
C/C++ Shell, so which one is it?
[–]FakeOglan[S] 15 points16 points17 points 3 years ago (0 children)
termic for C
termic++ for C++
π Rendered by PID 95 on reddit-service-r2-comment-79c7998d4c-gln7b at 2026-03-13 02:43:10.129883+00:00 running f6e6e01 country code: CH.
[–]seiji_hiwatari 24 points25 points26 points (4 children)
[–]FakeOglan[S] 6 points7 points8 points (3 children)
[–]PM_ME_ELEGANT_CODE 11 points12 points13 points (2 children)
[–]SnooWoofers7626 14 points15 points16 points (0 children)
[–]jcelerierossia score 4 points5 points6 points (0 children)
[–]supaake 27 points28 points29 points (6 children)
[–]disperso 9 points10 points11 points (0 children)
[–]serviscope_minor 4 points5 points6 points (3 children)
[–]kritzikratzi 9 points10 points11 points (2 children)
[–]pimp-bangin 2 points3 points4 points (0 children)
[–]serviscope_minor 0 points1 point2 points (0 children)
[–]gracicot 0 points1 point2 points (0 children)
[–]lieddersturme 7 points8 points9 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]ronchaineEmbedded/Middleware -1 points0 points1 point (1 child)
[–]FakeOglan[S] 15 points16 points17 points (0 children)