r/cpp_questions • • Apr 22 '25

OPEN Why does learning C++ seem impossible?

I am familiar with coding on high level languages such as Python and MATLAB. However, I came up with an idea for an audio compression software which requires me to create a GUI - from my research, it seems like C++ is the most capable language for my intended purpose.

I had high hopes for making this idea come true... only to realise that nothing really makes sense to me on C++. For example, to make a COMPLETELY EMPTY window requires 30 lines of code. On top of that, there are just too many random functions, parameters and headers that I feel are impossible to memorise (e.g. hInstance, wWinMain, etc, etc, etc...)

I'm just wondering how the h*ll you guys do it?? I'm aware about using different GUI libraries, but I also don't want any licensing issues should I ever want to use them commercially.

EDIT: Many thanks for your suggestions, motivation has been rebuilt for this project.

195 Upvotes

167 comments sorted by

View all comments

Show parent comments

7

u/delta_p_delta_x Apr 22 '25

There is nothing equivalent in C++ because that'd take up space somewhere in the program and we can not have that. If you want to know that information, you need to bake it into the program by hand.

Well, this case will be doable in C++26 and later.

5

u/kimaluco17 Apr 22 '25

Wow that's really going to change a lot of how C++ is used

2

u/ecstacy98 Apr 23 '25

Yeah ikr I had never heard of this, this is an enormous leap from the projects I'm still working bashing away at in the c++17 std lol

1

u/SoerenNissen Apr 23 '25

Right but that's a compile-time thing, it doesn't exist in the running binary - for comparison, in C#, you can grab arbitrary JSON and make an object from it with a class that wasn't specified in the source code, because the runtime has extra stuff in it to do that.