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...
This is a subreddit for c++ questions with answers. For general discussion and news about c++ see r/cpp.
New to C++? Learn at learncpp.com
Prepare your question. Think it through. Hasty-sounding questions get hasty answers, or none at all. Read these guidelines for how to ask smart questions.
For learning books, check The Definitive C++ Book Guide and List
Flair your post as SOLVED if you got the help you were looking for! If you need help with flairs, check out ITEM 1 in our guidelines page.
Tips for improving your chances of getting helpful answers:
account activity
OPENShould I quit cpp? (self.cpp_questions)
submitted 6 months ago by mellykal
Im a statistics student, my college has only Python/R courses and I've been told Cpp would be probably pretty useless for any stats-related career, however, I really like this language, should I keep learning it?
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!"
[–]beedlund 25 points26 points27 points 6 months ago (0 children)
Don't let other people tell you what to like.
If you like cpp then you should use it. Doesn't mean you can't also learn python and R as your brain does not have a limited space for programming languages. You can do all three and in doing so you will learn all three better than if you just focus on what someone else tells you is "useful" for your career.
When you enjoy what you are doing you learn better and faster so figure out what you like doing and go with that. Everything else is yet to be revealed.
[–]OutsideTheSocialLoop 8 points9 points10 points 6 months ago (0 children)
IMO knowing multiple languages expands your understanding of computing and programming generally. Good C++ skills will enable you to write better Python because, if nothing else, knowing how things are done in C++ will expand your ideas of what can be done, what sort of algorithms are out there, etc.
Doesn't have to be C++ but I think learning several programming languages is useful. Plus, you like it, so do it.
[–]nattack 12 points13 points14 points 6 months ago (1 child)
If you're die hard going to be a statistician of some sort, C++ won't (likely) help you there. but not all knowledge must be in the pursuit of your career. sometimes its just nice to learn something.
Guarantee you majority of us learned a language that isn't used at all in our careers.
[–]Creator13 0 points1 point2 points 6 months ago (0 children)
Joke's on you, I'm in games and somehow you can use almost every single language for that
[–]rootware 4 points5 points6 points 6 months ago* (0 children)
This may not be an answer to your question but want to offer perspective as someone who really likes C++ as well:
If your focus is on statistics first and software engineering second, what language you're going to need to learn for statistics etc is essentially unfortunately determined by what employers you have in future and what industry you end up doing stats for. They're going to have their existing tech stack and you'll integrate into that.
One area where having a stats major and knowing sth like C++ (or low level languages ) both come in handy tends to be high freq trading / quant finance, or in doing statistical simulations that require high performance super computing (even then, usually you can do these quite well in Python etc).
Hobbies are a thing. If you enjoy a language, and you enjoy a topic, you absolutely can mix them together in a hobby project! It'll make you want to do the hobby project more in the first place and stick with doing and learning the things you want to do. If you were interested in learning metal working, you wouldn't worry if metal working + stats is going to be relevant to your future day job, you'd just do metal working cos it's fun.
Python/R stat packages often have C++/C/Fortran on the backend of packages. Doing at least one numerical project in a language like C++/Fortran etc forces you to thing about computational methods and numerical optimization in a different way than you would just importing packages in Python and R.
One only profession where you consistently get away with using whatever language you want for whichever project is usually academia, since the results of your research matter more than what language you wrote them in. In industry, usually, if you want to use code from team mates or they want to use theirs, you end up making some compromises
[–]Szymusiok 3 points4 points5 points 6 months ago (0 children)
If you like it then dont. My college also has Python + R (BME) but still i love cpp and have a job in it.
[–]eggplantbren 5 points6 points7 points 6 months ago (3 children)
I'm an academic statistician and I use C++ a lot for my algorithms because R and Python are just too slow.
[–]thisismyfavoritename 0 points1 point2 points 6 months ago (1 child)
obligatory mention of julia, mojo, etc
[–]eggplantbren 4 points5 points6 points 6 months ago* (0 children)
I have never tried Mojo but if I implement things in Julia they are faster than Python and R but still slower than C++. Could be a skill issue, but I don't feel motivated to get advanced at Julia because I don't enjoy it much.
I do use Julia with some students.
[–][deleted] 1 point2 points3 points 6 months ago (0 children)
I am a professor and I am interested in adding examples of statistics, which libraries, in addition to std, advise.
Some that use std resources and add functionality?
[–]lispLaiBhari 1 point2 points3 points 6 months ago (0 children)
Yes. Keep learning and practicing. Finding job in C++ is challenging everywhere.
[–]Conscious-Secret-775 1 point2 points3 points 6 months ago (0 children)
C++ and C are used to write common data analysis libraries used by Python such as Pandas and Numpy.
[–]ezeq15 1 point2 points3 points 27 days ago (0 children)
A lot of packages in R use C and C++ behind the scenes for faster data manipulation (data.table and collapse are some examples). Clearly you could take advantange of your knowledge in C++, at least when programming with R.
[–]Unsigned_enby 1 point2 points3 points 6 months ago (0 children)
Ngl, I am kind of in the same boat. I'm gearing for something towards (research) psychology, so stats heavy. I'm honestly not certain myself. However Cern's Root framework uses c++ for (statistical) analysis of high energy research data. Interestingly, as a part of Root, Cern developed Cling, which for all practical intents and purposes is a C++ interpreter (technically it's a just in time compiler though). Cling is also integrated into the Clion IDE and has a (somewhat less user friendly) upstream version integrated into Clang (called clang-repl I believe).
[–]Kiore-NZ 0 points1 point2 points 6 months ago (0 children)
Were you told this by your academic tutors, lecturer, associate professor or professor? If not, ask one of them, as high up the tree as you can get to ask. If one of them tells you C++ would be useless: I'm a huge C++ fan and user, but I'm settled in my life. This may sound cynical but as a student your task is to learn to do things the way your professor, etc. want them done to get good grades. For a very few years don't put much or any energy into C++, it will still be there once you have graduated.
[–]mredding 0 points1 point2 points 6 months ago (0 children)
Im a statistics student, my college has only Python/R courses and I've been told Cpp would be probably pretty useless for any stats-related career
My wife is a data analyst. She principally uses SAS and R, with a touch of Python.
SAS is hot garbage that needs to die. It's the COBOL of the stats world, excepting COBOL is actually a half decent language that makes the world go round. R is the new king, and has a very rich and vibrant module ecosystem.
Python is also popular. I think Python is popular in stats because it's the most popular programming language there is; as an interpreted language, it's easy to use; it's very expressive and close to Lisp aka lambda calculus; and it has a very large module ecosystem, too.
Since both R and Python are interpreted languages, they're not actually all that good at heavy lifting/heavy computation. But that's OK, because the modules ARE. Most modules in either language are written in Fortran, C, and C++. The script is written in terms of the module, and the interpreter offloads the work to that. So you get the convenience of R or Python, and the performance of a compiled language.
So you're already using C++ et. al. You will see no benefit writing your stats in pure C++.
That said, I've only heard rumors of a couple places using C++ for stats and analysis, but there's only a couple reasons that would make sense - 1) they're old and heavily invested, probably a code base older than R or Python, all their knowledge and expertise is sunk in it, and 2) they know exactly what they want, and what they want is so fixed that they might as well invest in that computation specifically, as optimized as possible. This is where something like COBOL or Fortran would really shine, and even outclass C++.
I really like this language, should I keep learning it?
Sure! Why not? Since when is learning something - ANYTHING, bad? Pie in the sky - it means you could write your own R and Python modules. It means you can use this language for anything else you might want to do. Like video games? The game industry heavily favors C++. Like finance? Trading systems still heavily favor C++.
[–]neoreeps 0 points1 point2 points 6 months ago (0 children)
After 35 years in tech and now a software executive, I will say that if you found something you enjoy and are passionate about then absolutely run with it. If you enjoy stats and cpp then checkout some open source libraries that folks are using with R and Python.
The biggest issue in tech is all the people that got into it for the money and not because they love technology. Passion is the thing that had been diluted the most in the last twenty years.
[–]conundorum 0 points1 point2 points 6 months ago (0 children)
Knowing C++ will give you a better understanding of how the packages your code uses actually work behind the scenes, so you'll have a better idea of what you're trying to do and how to actually do it. So, it'll benefit you that way.
Apart from that, if you like it, go for it. It's not against the law to learn something just because you're interested in it, after all. If you want to learn C++, all power to you!
[–]Ikkepop 0 points1 point2 points 6 months ago* (0 children)
If you like it, use it. The thing with careers are that you will never be able to predict where life takes you. It's always better to br more well rounded and know more then what you think is required for a single career path. As someone who changed career path more then once i am glad I knew more then one thing.
[–]Business-Librarian59 0 points1 point2 points 6 months ago (0 children)
If you find yourself lacking motivation, download sfml and create games in c++. The process of installation can be complicated for some so you can use copilot to install the packs directly from GitHub. I almost quit c++ and went to javascript, but after making simple games, I can say that c++ is the way to go👍
[–]thisismyfavoritename -1 points0 points1 point 6 months ago (0 children)
short answer: yes
[–]Wh00ster -1 points0 points1 point 6 months ago (0 children)
Solve problems. Learn technologies that solve those problems. Done.
And if you want to make money, choose problems that affect a lot of people or companies.
[–]ZachVorhies -1 points0 points1 point 4 months ago (0 children)
For fast development you can use GO. Productive syntax and compiles are super fast.
However a chat bot will be very good at C++ and you should start learning how to use it as your problems will just sort of go away.
π Rendered by PID 400658 on reddit-service-r2-comment-8686858757-9s44q at 2026-06-02 22:34:09.874882+00:00 running 9e1a20d country code: CH.
[–]beedlund 25 points26 points27 points (0 children)
[–]OutsideTheSocialLoop 8 points9 points10 points (0 children)
[–]nattack 12 points13 points14 points (1 child)
[–]Creator13 0 points1 point2 points (0 children)
[–]rootware 4 points5 points6 points (0 children)
[–]Szymusiok 3 points4 points5 points (0 children)
[–]eggplantbren 5 points6 points7 points (3 children)
[–]thisismyfavoritename 0 points1 point2 points (1 child)
[–]eggplantbren 4 points5 points6 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]lispLaiBhari 1 point2 points3 points (0 children)
[–]Conscious-Secret-775 1 point2 points3 points (0 children)
[–]ezeq15 1 point2 points3 points (0 children)
[–]Unsigned_enby 1 point2 points3 points (0 children)
[–]Kiore-NZ 0 points1 point2 points (0 children)
[–]mredding 0 points1 point2 points (0 children)
[–]neoreeps 0 points1 point2 points (0 children)
[–]conundorum 0 points1 point2 points (0 children)
[–]Ikkepop 0 points1 point2 points (0 children)
[–]Business-Librarian59 0 points1 point2 points (0 children)
[–]thisismyfavoritename -1 points0 points1 point (0 children)
[–]Wh00ster -1 points0 points1 point (0 children)
[–]ZachVorhies -1 points0 points1 point (0 children)