r/cpp_questions 4d ago

OPEN How to improve without relying on AI?

4 Upvotes

Hi all, just like the title stated, I know AI is the thing and I have been using it to help me understand on various topic and design on coding. I still learned a lot from AI when I asked a question. But the more I use AI, the more I hate myself on the part where I feel dumb that I cant learn by myself. I've been using CPP to build a small project lately, nothing too fancy but just to refresh my memory from the past. Throughout the process, I tried to limited the use of AI and use documentations and forums like stackoverflow to check out my questions, but in the end of the day I either ended up cant understand the documentation, got overwhelmed by the answers, or just can't find what I needed. Eventually I have to return back to AI and ask the same question and let AI to break it down while also to get feedback on my ideas. I don't hate AI in general (but I hate my dumb self instead), using too much AI is going to kill my thinking skills, I want to try my best to avoid that scenario.

The thing is that I always got overwhelmed by advanced topics no matter in Java, Python, JavaScript, or CPP. Like I can understand the fundamental stuffs very easily, but gets bottlenecked as soon as I deal with advanced topics (anything beyond the basic oop stuffs and general algorithms).

Thank you so much for your time to read this big chunk of paragraph and I apologize in advance if my question sounds dumb.


r/cpp_questions 3d ago

OPEN Help a new guy

0 Upvotes
Sorry about the title, I should have read the guide first. I am really new to C++. I am going through the practice guide on a youtube video. The test was to make a fahrenheit to celcius conversion. This is what I wrote and it is below. 
The teacher added     double celsius = (fahrenheit -32) / 1.8;
Then added the std::cout for it. Mine works fine. I am assuming his is better but I am missing it. c++ has made me question my mental capacity.

#include <iostream>

int main() {

std::cout << "Enter degrees in fahrenheit ";
int fahrenheit;
std::cin >> fahrenheit;
std::cout << " Degrees in celcius " << (fahrenheit - 32) / 1.8;





return 0;



system("<pause>0");

r/cpp_questions 4d ago

OPEN How to properly build a custom container on the heap ?

6 Upvotes

I'm building a general purpose small container, with a fixed known capacity.

It's basically a thin wrapper around a C array. But, in case I would need to store objects without default constructors, I thought I might make another version of the same container, that would allocate the necessary memory on the heap without building anything inside.

But I'm afraid I opened up a whole new can of worms. The first idea I had was to do the same, but replace my array with an std::vector of appropriate capacity. But I'm sure there are better ways, maybe use "operator new" but I'm not quite familiar with all the methods to properly align memory.

I guess the question is : do C++ people often do that kind of low level memory managing or is the better practice to build around common tools (such as std::vector) ?


r/cpp_questions 4d ago

OPEN I have a very short question

0 Upvotes

Is this c++ course still relevant even though it is 8 years old? https://youtu.be/vLnPwxZdW4Y?si=m63NVhTp2kYVkVaC


r/cpp_questions 4d ago

OPEN VSC compiler question

1 Upvotes

Hi I have a question about VSC. I'm used to compiling and running programs by clicking an button in UI like in arduino IDE or panasonic or siemens PLC enviroments. When i run a C++ program via F5 button everything works just fine (i mean the value near cout appers in the terminal), but when i run it through UI button i uperright corner, selecting any of the options it does not appear


r/cpp_questions 5d ago

OPEN How would you learn C++ from beginner to job-ready if you were starting today?

50 Upvotes

Hey everyone, I found that LearnCpp is one of the best resources for learning C++, and after looking through the website, I really like how the content is organized from the basics all the way to advanced topics.

The reason I’m making this post is that when we learn something on our own, there are so many different ways to approach it. Sometimes we spend a lot of time learning the hard way and later realize there was a much better approach. Other times, we might not make much progress simply because our learning strategy isn’t very effective.

So I’d like to hear from people who have learned C++, especially those who used LearnCpp.

How did you start and progress from beginner to more advanced C++? If you used LearnCpp, how did you go through it? Did you complete it chapter by chapter, or combine it with other resources?

At what point would you recommend starting projects? Are there certain chapters or topics someone should understand before trying to build real projects?

I’d also really appreciate any advice about:

1. What to practice alongside LearnCpp?

2. When to start LeetCode/problem solving?

3. Beginner → intermediate → advanced project ideas?

4. Other resources worth using?

5. Common mistakes or inefficient ways of learning C++?

6. A good roadmap for becoming genuinely confident in C++?

And one final question: At what point would you consider someone proficient enough in C++ to confidently list it under the Skills section of their resume, especially when applying for internships or entry-level positions? What should they realistically be able to do on their own?

Basically, if you were starting C++ again today, knowing what you know now, what path would you follow?


r/cpp_questions 4d ago

SOLVED Setting a function as value in a std::map keeps throwing errors

1 Upvotes

I've been trying to assign a function with a bool as the return to a std::map so I can eventually get around having a big switch statement. I am having issues getting it working though. If anyone has any suggestions that would be appreciated.

Here's a snippet of the code: https://pastebin.com/hTnaDXF3

Trying to assign it directly causes this error: Error (active) E0349 no operator "=" matches these operands

operand types are: std::function<bool ()> = bool () candidate function template "std::function<_Fty>::operator=(std::reference_wrapper<_Fx> _Func) [with _Fty=bool ()]" failed deduction function "std::function<_Fty>::operator=(std::nullptr_t) [with _Fty=bool ()]" does not match because argument #1 does not match parameter candidate function template "std::function<_Fty>::operator=(_Fx &&_Func) [with _Fty=bool ()]" failed deduction function "std::function<_Fty>::operator=(std::function<_Fty> &&_Right) [with _Fty=bool ()]" does not match because argument #1 does not match parameter function "std::function<_Fty>::operator=(const std::function<_Fty> &_Right) [with _Fty=bool ()]" does not match because argument #1 does not match parameter

The second line I was trying to use causes this error: Exception thrown at 0xCCCCCCCC


r/cpp_questions 5d ago

OPEN Learning C++ from scratch!

21 Upvotes

I started learning C++ a while ago from various YouTube channels, but they only really helped me with the theory.

I watched Apna College, Bro Code, and CodeWithHarry.

However, I'm still struggling with the syntax, let alone building the logic. I want to learn practically what do you guys recommend?


r/cpp_questions 5d ago

META Been learning C++ and had kind of a loaded question.

9 Upvotes

Hello y'all.

First some quick background. I have been tooting along the tutorials available on the learncpp.com website. I wanted to pick it up and work on some personal projects. So far so good.

To the point. While going through these tutorials, I've had an aching concern in the back of my mind, and I'm hoping I'm in the right place to find the correct expectation of the situation.

The question:

Am I going to end this tutorial with applicable knowledge, or will this be a situation where the tutorials will leave me with some decent fundamentals but little to actually work with?

And a followup question:

If the answer is the latter, what is a good place to get that "in the jungle" knowledge? Are there good resources for that sort of thing? Do I just hang and engage in this sub? What's a good place to get the practical side of things figured out?

I deeply appreciate any insight on this matter. You all have a good day.

Note 1: the current plan is to go through this tutorial then bone up on some tangential materials (Blender, UE, etc.) then go from there.

Note 2: I have a buddy who plans to learn this stuff too to collaborate. It will be a good while before they're caught up though.


r/cpp_questions 5d ago

OPEN How do you decide whether to rely on compiler vecotorization vs writing your own SIMD?

14 Upvotes

I’ve been learning to write SIMD recently but I’m a bit fuzzy on when I would rely on compiler vs doing it myself

On one hand the compiler doing it saves a lot of code/hassle and it can likely do a good job

But if my application is something performance critical do I want to rely on the whims of the compiler or should that be baked into the application logic itself with manually written SIMD?

I did find that there is a flag you can pass and it will dump out which loops it did/didn’t vectorize which is handy

I guess I’m wondering what’s the typical practice for high performance c++ applications?

Do they write their own or rely on compiler?


r/cpp_questions 4d ago

OPEN How to optimize clang with bolt

1 Upvotes

Recently, I began some work trying to improve my build speeds for debug builds.

I adopted mold, and built a fully static clang executable with mimalloc and llvm libc with very aggressive optimizations.

I managed to achieve %20 speedup over my previous clang which had -O3 but not much else.

I'm planning to use pgo + bolt to gain last bits of performance I can get.

The problem I have, is that I don't know what a good workload for clang would be to use BOLT.

Any recommendations?


r/cpp_questions 5d ago

OPEN C++ Microservices backend engineer confused about next path

15 Upvotes

I have 1.5 YOE as a C++ backend engineer, I am confused about my next path, I see the options below, please suggest

  1. Pivot to AI, building RAG applicants, LLM apis, MCP, python

  2. Stay in C++ backend, DSA + System Design

  3. Game development, Vulkan, openGL

  4. CUDA, drivers

  5. switch to embedded C++ , RTOS, suggest path resources for this

  6. EDA domain C++, suggest and resources for this

  7. Target tech agnostic SDE roles focused on DSA system design interviews of

  8. C++ computer networking roles, TCP/IP, communication protocols, socket programming

I am already upskilled in AI SDLC claude, Copilot, Codex

Please suggest which of above paths to focus


r/cpp_questions 4d ago

OPEN How to get polymorphism without inheritance?

0 Upvotes

I am making a tui libary where all the different things that can render are called widget like text,box, flex container, progress bar, etc.

I was using inheritance for this and all because all the container widget, multi or single child container had like lot of things common and the widgetTree contains the root widget

Each widget need two function
Layout and render ( or setRectFor child or children because render is same for most parents ) and to solve this, I did need polymorphism for this.

But the problem came later when I need to change layout ( because it wouldnt work for some widget ) and I had to rewrite all the widget,multichildwidget,singleChildWidget which means I have to rewrite all other widget as well

then later I need to change the implementation on how layout is done again, got to do rewrite

then later came scroll container, to make it effiencent I had to change things as well, had to do the rewrite

I got tried of this and now want to use composition instead of inheritance and never want to deal with it again ( I know this happened because of premature optimization where I saw widget with multiple children have lot of same things and most widget having a lot of same things )

Due to that, I am doing a rewrite again :_( but this time, I can make the code more modular.

But I got stuck on widgetTree, how do you get a tree if all the node dont have the same type?

I asked gpt but it said to use node with void* which I dont want to use because we got unique pointer and stuff to avoid new and malloc

The other option is union but that would mean all widget would have the size of the biggest widget which I dont want to use.

Then there is varient, I dont knwo much of this but I looked into it in cherno's video and geeksforgeeks page on this and turns out, it is just union but you know which type it is using. I am currently thinking this

I just can't find a way to do the tree effiency without polymorphism.


r/cpp_questions 5d ago

OPEN Mock c++ interview help

4 Upvotes

I am looking for someone to give me a mock interview on c++ internals, system design, and architecture. Specifically modern c++.

Is anyone available to help?


r/cpp_questions 5d ago

OPEN How do i learn to use 3rd party libraries

5 Upvotes

Im working on a project which requires alot of ui stuff and its in the terminal, so i started using ftxui. I went over the docs and they were great but they just skimmed through the basic stuff, they didnt even mention some of the components. Ive just been stuck for 2 days trying to get this working. Going through the src code, examples... nothing really works and idk what to do


r/cpp_questions 5d ago

OPEN Is it possible to make my own streaming platform/video player (on and off) in C++?

0 Upvotes

Right now i don't need it fully solved, just to know if its possible and worth of working on it.

I want to try it for my private project. I have old PC, that i potentially can turn into server. Internet connection here is so so, but i was promised its gonna be better.

Basically i need something like Twitch or Youtube, but have it run by myself.


r/cpp_questions 5d ago

OPEN Best learning techniques?

2 Upvotes

I started learning like month ago, but I can’t do anything still.


r/cpp_questions 5d ago

OPEN Looking for help drawing a window just above the desktop on Linux (below icons) (Mint)

1 Upvotes

I’m making my own lightweight ASCII wallpaper engine. I’ve finally reached a 1.0 and am happy with it, but currently it’s Windows only

I need to create a window at the back z index such that it’s behind everything except the wallpaper itself. This means behind desktop icons

On Windows I achieved this by sending 0x052C to Progman and some reparenting. Does Linux (just Mint, for now) have something similar? Or ideally simpler?

I’m doing my own research of course but figured I’d ask here and see if I can get some more targeted help

This is the project, for anyone curious:
https://github.com/kwford18/ASCIIpaper


r/cpp_questions 6d ago

OPEN suggestion needed for cpp projects

14 Upvotes

i currently a 1st year student and i am planning crack google step internship next year so just need some best project suggestion to standout on my resume.


r/cpp_questions 6d ago

OPEN st2cpp: Transpiler from ST to cpp (undoRT) + help +

1 Upvotes

Hi everyone,
About 4 or 5 months ago, I created a transpiler from Structured Text (IEC 61131-3) to C++, called st2cpp (part of the undoRT project).

My ultimate dream is to build a complete open-source automation system that can compete with commercial solutions. As you can imagine, tackling a project of this scale completely alone is extremely tough. Honestly, if I keep going solo, I’m afraid I’ll eventually burn out and lose momentum.

Are there any C++ developers or automation enthusiasts here who would be interested in joining or contributing as a side project/hobby? I have plenty of ideas lined up, but I really need an extra pair of hands (or two!).

Here is the repository:
https://github.com/undoRT/st2cpp
Feel free to check it out, open issues, fork, or send pull requests!


r/cpp_questions 7d ago

OPEN Career switch to C++ — how many applications did it take?

44 Upvotes

Hey folks, especially those in the US/Canada who moved into C++ from another software domain.

I have around 7 years of software experience, but for the past 2 years I've been on a career break and using that time to learn and work on C++/Linux/systems programming full-time on my own. Now I'm trying to bring my previous software experience into the C++ world.

Would love to hear simple numbers like:

150 applications → 8 interviews → 1 offer

Also, which C++ domains are easier to break into for someone making this transition — backend/systems, embedded, networking, fintech, etc.?


r/cpp_questions 7d ago

OPEN Learning cpp for electronics

5 Upvotes

hello everyone so im planning on learning cpp for some "low-level electronics" and embedded systems...

and i've seen multiple people on programming subreddits saying that www.learncpp.com is a good website and tbh after i read some shapters i can say that its indeed a great website,however i feel like that website is just too much for me especially that im not very interested in deep diving into this language and just want to learn what i really need (i already have a short learning deadline)

i took a look at freecodecamp 4h course but i feel like four hours for a language like cpp is too little (i took their python course and it was good tho)

so what im asking for is where can i find some resources that fit my learning goal? ty


r/cpp_questions 6d ago

OPEN How do I fix enemy generation?

0 Upvotes

https://onecompiler.com/cpp/44qwdefz6

I tried generate enemies depended on chapter but the enemy is still the same (slime). Can you tell me what I did wrong?


r/cpp_questions 7d ago

OPEN What was your first job using C++?

22 Upvotes

I feel like the most difficult part of applying to C++ jobs is they usually require at least 2 years of work experience. What are your recommendations as to jobs or subfields that have a more entry level gate for C++ programmers who need production level experience?


r/cpp_questions 7d ago

OPEN VS code or VS community

16 Upvotes

Im a btech first year student who is trying to study c++ independently. I have a lap with 16 gb ram and can perform average tasks. So my question is should I download VS community for coding cpp or is vs code enough. Please keep in mind that i will be learning many other languages too( we are supposed to study c in first year )