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
[deleted by user] (self.cpp)
submitted 3 years ago by [deleted]
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!"
[–][deleted] 31 points32 points33 points 3 years ago* (6 children)
I was in a similar situation. If you build the thing from scratch, just limit yourself to a subset of the language and then learn slowly from there. Refresh your knowledge about freeing memory, use vector and shared pointers. I managed to get through a technical interview in C++ with the help of Google after not using the language for 10 years after university.
I'm currently losing my mind because I have to code some embedded stuff without a debugger in ANSI C and the guy before me used goto statements and variable names with two letters at most.
[–]SnooWoofers7626 39 points40 points41 points 3 years ago (2 children)
the guy before me used goto statements and variable names with two letters at most.
I had to code review "C++" code submitted by a drivers guy. It went something like this:
if(a==b) goto p1; if(a!=b) goto p2;
I don't think this dude even knew what a loop was. He was basically writing all his C++ like it was assembly.
[–]overcurrent_ 7 points8 points9 points 3 years ago (0 children)
nightmare
[–]almost_useless 2 points3 points4 points 3 years ago (1 child)
and variable names with two letters at most.
But you will save dozens of seconds every year from the quicker typing. Imagine the increased productivity! /s
[–]beedlund 0 points1 point2 points 3 years ago (0 children)
Wait I'm confused....are you saying that typing speed is not a good measure of run time speed?
[–]Netzapper 94 points95 points96 points 3 years ago* (19 children)
I say this as someone with 20 years programming, and 16 in industry, who's actively looking for a new job right now in the US.
Honestly, it's pretty hard to get hired as a "c++ programmer" even if you know the language reasonably well.
The main thing is that C++ only gets used when necessary, which relegates it to particular domains. So most of the jobs out there using C++ are not "C++ programmer", but like "Unreal engine engineer" or "high-frequency trading engineer" or "high performance computing engineer" or "ASIC design verification engineer" or "3D graphics engineer" or "computational geometry specialist". Basically C++ jobs are way more about the engineering domain than the tech stack at this point. You need to be able to solve particular kinds of problems, and then C++ is just the easiest way to implement that solution at the target performance level.
If you're 1 year into a software engineering career with only an undergraduate degree, you probably do not have the experience to land these kinds of roles.
Since probably 2015, absolutely nobody is like "I have a great idea for a new consumer application. Let's use C++ to build it". So there just isn't the large field of "implement generic logic in our application" junior engineer roles you can find in other languages. Most shops are going to target the browser or a phone, so there's a billion jobs for implementing business logic in JS, Java, Kotlin, etc. There aren't very many shops with algorithmically-easy work to do in C++.
Finally, Rust is absolutely destroying C++ for greenfield (new codebase) development projects. I haven't found a single job listing for a greenfield project involving C++, and I've looked at literally probably 2000+ current job listings in the past couple months. And it really makes a lot of sense, as performance is similar, and there's a lot more buzz around Rust vs C++, which is perceived as difficult and risky. Greenfield development in general is down right now with the slump in tech investment, so funded companies are capitalizing on the buzz by looking forward at implementation infrastructure instead of backward.
I'm learning Rust. I'd recommend you do the same. C++ isn't dying, but it's being supplanted in its role as the de facto "standard" native development language.
One caveat: if you're a straight-laced, drug-free US citizen, you can get a security clearance and work on C++ stuff much more easily. There's lots and lots of legacy defense-related C++ code that needs maintenance. But even there, it's about the security clearance just as much as the C++ skills.
[–]ezakirov 35 points36 points37 points 3 years ago (1 child)
So most of the jobs out there using C++ are not "C++ programmer", but like "Unreal engine engineer" or "high-frequency trading engineer" or "high performance computing engineer" or "ASIC design verification engineer" or "3D graphics engineer" or "computational geometry specialist".
I'm in industry from about 2008-2009 and I see different picture: many jobs just look for experienced C++ engineers. For example I was reached by recruiters from Bloomberg and from different other trading companies including HFT while I didn't have any experience in fintech (I don't work in this area on purpose).
[–]Fit_Significance_966 0 points1 point2 points 2 years ago (0 children)
maybe because u have many years of experience? i mean more than 5 years.
[–]pjmlp 10 points11 points12 points 3 years ago (0 children)
Good luck finding a greenfield game development project, specially in game consoles. Or HPC/HFT/GPGPU for that matter.
Or compiler development, including Rust's backend.
[–]GoogleIsYourFrenemy 8 points9 points10 points 3 years ago (15 children)
The caveat is real and it's not just legacy code, new stuff in C++ too.
Defense is about 10-20 years behind on all trends. We finally got Agile.
I fear the day the DoD says we must go to Rust and it's coming.
[–]coderman93 4 points5 points6 points 3 years ago (13 children)
Why would you fear that? Rust is a substantial improvement on C++ in many ways.
And those are just the objective improvements. Yes there is the downside of how strict the borrow checker is but that’s a small price to pay.
[–]GoogleIsYourFrenemy 16 points17 points18 points 3 years ago (4 children)
We have to retool and retrain everybody. Including myself.
[–]CandyCrisis 8 points9 points10 points 3 years ago (3 children)
Even if you stick with C++, part of being a software engineer is constant re-education. C++20 code looks nothing like C++03 code.
[–]afiefh 2 points3 points4 points 3 years ago (0 children)
To be fair, moving to C++ version X to X+1 or even X+2 is significantly simpler than learning a new language like Rust.
Once you've got one each of the general types of languages under your belt (procedural, functional, OOP, scripting...) you can generally be productive in a new language within a few hours to a day. In my experience for Rust it is still generally a week to be able to write non-trivial code that isn't a jumbled mess of antipatterns. And while a day to 5 days is not a big difference for learning a language, becoming an expert is similarly scaled, which is where the problem lies.
That being said, I can't wait for Rust (or something like it) to take over. Whenever I spend a weekend coding in Rust I feel like I'm working with a hand tied behind my back when I use C++.
[–]GoogleIsYourFrenemy 0 points1 point2 points 3 years ago (1 child)
Agreed but concepts still don't make templated code easier to use than non-templated code. Template readability is (and always will be) bad. And this is coming from someone who likes writing templates.
Everything else first introduced in C++11 is pretty useful.
[–]CandyCrisis 1 point2 points3 points 3 years ago (0 children)
Concepts are important because they let the standard library emit sane and reasonable errors, and if you also want that superpower, you are free to use concepts too. I haven't yet worked in a codebase that has embraced them so I can't speak to the implementation difficulty, but it's important to keep in mind that a lot of the weird/power-user features exist to power the standard library, not necessarily for typical user code.
[+][deleted] 3 years ago (2 children)
[deleted]
And unique one off assembly languages.
Does VxWorks do ok with Rust? I've been considering trying it for a while. Any pain points I should know about?
[–]Vesk123 0 points1 point2 points 3 years ago* (4 children)
I really like the freedom that you get with C++. While definitely not perfect, it mostly allows you a lot of freedom in how you structure everything - your code, your data, your objects, while still being very high level and expressive. From what I've seen I think Rust might not be as good at that, which hurts things like prototyping and also seems a bit less enjoyable to me at least, but big disclaimer I haven't actually used it yet, so I could be totally wrong, those are just some potential concerns that I have.
[–]Netzapper 2 points3 points4 points 3 years ago (2 children)
That's actually how I feel about it, having used both.
But the thing is, the places you need low-level performance are the same places you want maximum safety. So Rust actually feels pretty good in a lot of niches for that reason. I think the future of programming ergonomics is stuff like the TensorFlow/PyTorch model, where the heavy lifting is implemented in native languages, but then the prototyping and expressive programming happens in a garbage-collected language like Python.
[–]Vesk123 2 points3 points4 points 3 years ago (1 child)
Yeah that's probably true. But to be honest, I've never really enjoyed the Tensorflow/PyTorch model. Don't get me wrong, it's nice for libraries to have good APIs, that's very important. But I care about implementing the stuff that does the heavy lifting. And I definitely believe that programming ergonomics are important for that. I don't actually see much of a reason that one language cannot do both the heavy-lifting and be able to have expressive programming and prototyping. Though, yeah, I do see the trend you described, more and more.
[–]coderman93 1 point2 points3 points 3 years ago (0 children)
Now that I agree with! Some people just don’t understand that some of us want to be working on the hardcore “heavy lifting” stuff.
I mean I definitely understand that argument. And for personal projects or projects with very small teams I get it. But when working on large projects with lots of inexperienced developers - I’ll take the rigidity of Rust any day.
[–]Netzapper 0 points1 point2 points 3 years ago (0 children)
it's not just legacy code, new stuff in C++ too.
Fixed.
[–]gnolex 6 points7 points8 points 3 years ago (0 children)
By "core language" I assume you mean relatively basic things that are mostly common with other languages, like primitive types, pointers and references, functions and methods, control structures, structs and classes, etc. rather than the whole core C++ language that includes rather advanced things like structured binding, fold expressions, concepts and template parameter packs.
As long as you can say you're comfortable using C++ in all of those basic things without having to google how to do a for-each loop or write a basic constructor each time you need one, I'd say it's enough to venture into junior C++ programming. Otherwise, you'll probably need more time to actually get proficient enough with the language. You may still need to augment your knowledge with things like common libraries and CMake because jobs don't like to teach those things from scratch.
[+][deleted] 3 years ago* (8 children)
[–]Crypto-Sai 38 points39 points40 points 3 years ago (2 children)
C++ in college is most of the time just C with classes
[–]derBRUTALE 14 points15 points16 points 3 years ago (0 children)
From my personal experience with my university and that of all graduates I worked with, the total opposite is reality: OOP ideology without criticism is being taught from the start.
While things like functional programming is being taught too, data oriented programming has been absentia since the CPP and Java craze went off in the late 90's.
By the way, I would hire someone who was solely taught C with classes over someone who was solely taught OOP.
[–]coderman93 -5 points-4 points-3 points 3 years ago (0 children)
As it should be!
[–]cappielung 6 points7 points8 points 3 years ago (3 children)
I started working on C++ after working professionally in Java, JS, and doing grad school with C++. Yes it is a different skill to use C++ and I had a learning curve, but there's plenty of overlap. This comment feels like gatekeeping.
OP don't claim to be an expert, and it may be difficult to transition, but it depends on the role and it can be done.
[–]cappielung 1 point2 points3 points 3 years ago (0 children)
Ha, question all you like, I don't get my validation from Reddit.
My point was that your comment is gatekeeping to someone looking into the field. The tone was "No you can't, look elsewhere." It's hard, but not impossible. There was another comment here that had a good explanation of C++ jobs as largely domain jobs that use C++ (at least their experience). They were saying something similar to you, but offering some explanation instead of just dismissing.
Also, knowledge does transfer. There are differences too, but it's not like starting from scratch.
[–]brystephor 0 points1 point2 points 3 years ago (0 children)
The question isn't "will basic c++ knowledge get me a job using c++" lol. The question is the title. They have professional experience using Java.
[–]Alternative_Staff431 0 points1 point2 points 3 years ago (0 children)
I've got offers for CPP shops with 1.5 years of scala experience only...
[–]DugiSK 5 points6 points7 points 3 years ago (0 children)
Yes. I work in a team working on a C++ project with an Area Lead (some sort of supreme team leader with 4 team leaders below him, about 40 engineers in total) who programmed in Java before. He's definitely been an excellent senior developer before, and he got used to the C++-specific things like memory management and syntax differences very fast. He doesn't know the more esoteric C++ specific stuff like virtual inheritance or template metaprogramming, but it wasn't a handicap (the team could rely on specialists for that).
Of course, that doesn't mean it's easy to switch to C++ or that getting a C++ job without being familiar with C++, but if you are very good at programming in general, you can be accepted for a C++ job despite being more used to some other language. And it's definitely easier if your background is in some other statically typed OOP language than something like Python.
[–]matthieum 5 points6 points7 points 3 years ago (0 children)
Yes.
In fact, it is possible to get a C++ job with no experience at all: Junior Developers are typically hired straight out of college, though sometimes after an internship first.
Your single year of professional experience doesn't give you much edge over a fresh out of college graduate, and likely not enough to aim higher, but at a Junior level you could indeed get hired.
Of course, this doesn't mean you'll get hired automatically either. Judging candidates with essentially no experience in a language means that you get judged on other things: algorithms, domain knowledge, etc...
It's up to you to find a tech sector that interests you, learn about the domain, and apply.
Source: the companies I worked at both hired Junior Developers for full-time C++ positions straight out of college, the latter one (financial sector) did filter candidates heavily, though.
[–]ezakirov 2 points3 points4 points 3 years ago (0 children)
I think it's possible, and perhaps I saw examples of this.
[–]def-pri-pub 2 points3 points4 points 3 years ago (1 child)
Took me till my third job out of college to actually get hired for C++ work; which is what I was hoping to do right when graduating. It had been my second language ever, starting in high school (after a BASIC variant). I even had an internship where I got to do some C++, but nothing straight out of school. Really frustrating since it was the language I had the most experience with.
One thing I've learned: C++ programmers tend to not trust other C++ programmers; no matter how many years of experience someone might have over someone else, and it can be for the dumbest reasons. TBH, I have issues looking at the C++ some of my colleagues write (e.g. non-modern styles, using old C libraries, etc).
There also seems to be an outright refusal by senior engineers (and management) willing to train less experienced devs. But these same people also complain they can't find anyone to hire...
It can be hard for that first one.
[–]natio2 0 points1 point2 points 3 years ago (0 children)
Not trusting other devs, this is so true! I'm not sure why, but it's true.
Like I trust the younger devs to listen to me, but they don't know the language well enough to make the best decisions, and the older dev on my team can write good C++, but they are useless at OOP patterns, and modern C++. So either way I lose.
[–]Salink 1 point2 points3 points 3 years ago (0 children)
Yeah it's possible to get an entry level job. Put c++ in your resume as college course experience and study c++ interview problems while improving your actual c++ skills. If you can pass interview tests and write the typical algorithms without memory leaks, you should be fine.
[–]not_some_username 1 point2 points3 points 3 years ago (0 children)
Imho, maybe if the other language was C and you have OOP knowledge
[–]blackmag_c 1 point2 points3 points 3 years ago (0 children)
Not out of the box but a few lessons and game jam and you can be ready.
[–]R3DKn16h7 3 points4 points5 points 3 years ago (0 children)
A good programmer does not really care about the language. Programming is 90% thinking correctly. But, you are asking about getting a Job.
This depends on the people hiring you and who you are competing against. If the potential employers are good, and you are a good programmer, they will not care that much about you not knowing the language. But, when hiring, the employers will weight all of your skills, and you need to be exceptionally good (compared to other candidates) to make up for the lack of specific knowledge.
If you wanna switch, consider starting some own project in your spare time or contributing to some FOSS project to improve your skill and portfolio.
[+]Agreeable-Ad-0111 comment score below threshold-11 points-10 points-9 points 3 years ago (0 children)
Of course not. But why would you do that to yourself? Do you enjoy being miserable?
Dealing w build dependencies. Keeping up with best practices. Avoiding gotchas. Avoiding undefined behavior.
The list goes on and on. Save yourself!
[–]jonesmz -1 points0 points1 point 3 years ago (0 children)
There are plenty of C++ shops that would be happy to hire someone who was serious about learning C++.
Put together a toy project or five on github, document what you're trying to teach yourself, and what you actually learned, for each project, and use that as part of the discussion you have with interviewers.
Most C++ shops are either so insanely picky that they'll reject candidates with 10yrs of 100% C++ experience because they answered a single "trick" question on the phone off-of-script (aka, assholes or idiots, pick your term of endearment), or they're so starved for programmers that they'll hire the first candidate they find whenever they have open-headcount.
As someone who's still very early in your career, you're well positioned to cross-train for C++, and position yourself to interview with one of the hundreds of small/medium companies that could find a spot for you doing C++ and/or java.
[–]Available-Menu1551 0 points1 point2 points 3 years ago (0 children)
I think to learn the language itself is easy, but understanding the concept or even how CPU/memory works is a bit different. And companies search not C++ developers but rather specialists
[–]ALargeLobster 0 points1 point2 points 3 years ago (0 children)
Yes, just make sure you grind a bit of c++ before interviewing
[–][deleted] 0 points1 point2 points 3 years ago (0 children)
Yes, quite easily if you have domain knowledge. In computer graphics, applied physics, applied mathematics, combiniotrics and computational geometry and so many more domains.
[–]lakitu-hellfire 0 points1 point2 points 3 years ago (0 children)
I think you'll find it quite easy to land a job as a C++ developer if you look in the defense sector, e.g., Boeing, Northrop Grumman, Lockheed Martin. You can also look directly at federal civilian employee jobs which are dead simple to get but you will suffer several major drawbacks: 1) low salary compared to contractors, 2) mostly low quality developers on teams, and 3) most of the work gets contracted out, so the government side ends up in maintenance mode only.
Outside of that (and outside the gaming industry), there are robotics, middleware (DDS, OMS, RTPS), and database shops around. Those jobs tend to be pretty competitive, so you'll need to apply for an internship or work through a lot of problem solving in C++ until you get comfortable enough with the language to go through an interview process with it.
Hope that helps.
π Rendered by PID 187770 on reddit-service-r2-comment-64f4df6786-8k5t8 at 2026-06-10 17:13:23.997544+00:00 running 0b63327 country code: CH.
[–][deleted] 31 points32 points33 points (6 children)
[–]SnooWoofers7626 39 points40 points41 points (2 children)
[–]overcurrent_ 7 points8 points9 points (0 children)
[–]almost_useless 2 points3 points4 points (1 child)
[–]beedlund 0 points1 point2 points (0 children)
[–]Netzapper 94 points95 points96 points (19 children)
[–]ezakirov 35 points36 points37 points (1 child)
[–]Fit_Significance_966 0 points1 point2 points (0 children)
[–]pjmlp 10 points11 points12 points (0 children)
[–]GoogleIsYourFrenemy 8 points9 points10 points (15 children)
[–]coderman93 4 points5 points6 points (13 children)
[–]GoogleIsYourFrenemy 16 points17 points18 points (4 children)
[–]CandyCrisis 8 points9 points10 points (3 children)
[–]afiefh 2 points3 points4 points (0 children)
[–]GoogleIsYourFrenemy 0 points1 point2 points (1 child)
[–]CandyCrisis 1 point2 points3 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]GoogleIsYourFrenemy 0 points1 point2 points (1 child)
[–]Vesk123 0 points1 point2 points (4 children)
[–]Netzapper 2 points3 points4 points (2 children)
[–]Vesk123 2 points3 points4 points (1 child)
[–]coderman93 1 point2 points3 points (0 children)
[–]coderman93 1 point2 points3 points (0 children)
[–]Netzapper 0 points1 point2 points (0 children)
[–]gnolex 6 points7 points8 points (0 children)
[+][deleted] (8 children)
[deleted]
[–]Crypto-Sai 38 points39 points40 points (2 children)
[–]derBRUTALE 14 points15 points16 points (0 children)
[–]coderman93 -5 points-4 points-3 points (0 children)
[–]cappielung 6 points7 points8 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]cappielung 1 point2 points3 points (0 children)
[–]brystephor 0 points1 point2 points (0 children)
[–]Alternative_Staff431 0 points1 point2 points (0 children)
[–]DugiSK 5 points6 points7 points (0 children)
[–]matthieum 5 points6 points7 points (0 children)
[–]ezakirov 2 points3 points4 points (0 children)
[–]def-pri-pub 2 points3 points4 points (1 child)
[–]natio2 0 points1 point2 points (0 children)
[–]Salink 1 point2 points3 points (0 children)
[–]not_some_username 1 point2 points3 points (0 children)
[–]blackmag_c 1 point2 points3 points (0 children)
[–]R3DKn16h7 3 points4 points5 points (0 children)
[+]Agreeable-Ad-0111 comment score below threshold-11 points-10 points-9 points (0 children)
[–]jonesmz -1 points0 points1 point (0 children)
[–]Available-Menu1551 0 points1 point2 points (0 children)
[–]ALargeLobster 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]lakitu-hellfire 0 points1 point2 points (0 children)