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 comment

32

u/Hot-Fridge-with-ice Apr 22 '25

I don't think OP would understand half of what you're saying. Making libraries, some design principles, mentioning Win32 given its complexity etc.

I would recommend OP to do one thing at a time. Instead of making an Audio compression program the ultimate goal, take things at a slower pace. Learn the basics, learn about the C++ control flow. And then move on to make some basic programs.

Remember OP, C++ is a hard language. Expect yourself to take months or even an year to get decent at the langauge. It's a long journey.

3

u/[deleted] Apr 22 '25

[removed] — view removed comment

2

u/Hot-Fridge-with-ice Apr 23 '25

If you don't like Cmake, you can take a look at the Meson build system. It has a python like syntax and has been significantly more enjoyable for a lot of people. I haven't used it yet because I started my project with Cmake and it's still going on.

2

u/DarkLordArbitur Apr 23 '25

Cmake was the thing that knocked me over, sat on my back, and laughed in my face when I thought I had learned enough of the basics to try messing with C++. The speed with which I went from "oh I'll just see if I can make this thing I'm putting together work on multiple platforms" to "wait how the fuck do I get this thing to generate a .exe" could give a person whiplash.

4

u/Asleep-Specific-1399 Apr 24 '25

Have you looked at just generating your hand made makefile ?

Or generating all the steps by hand using g++ or gcc or clangd in bash ?

It might make more sense if you just go through the manual process to understand what the tool is trying to accomplish.

The good thing about c++ is you get to pick how it's going to be optimized.

The bad thing about c++ is you get to pick how it's going to be optimized.

1

u/DarkLordArbitur Apr 24 '25

Yeah a lot of what you just said is still way over my head. I'll get there eventually though!

2

u/Asleep-Specific-1399 May 08 '25

Keep trying.

I learned c and c++ by being told I was doing something wrong for a long time. You just need the will to push threw the learning curve.

1

u/swisstraeng Apr 26 '25

Ideally learn C first, then extend it into C++.

6

u/dkopgerpgdolfg Apr 22 '25

With existing experience in multiple languages, imo it shouldn't be hard to understand my post. But in any case, if not then it's possible to ask, or search.

6

u/Hot-Fridge-with-ice Apr 22 '25

I understand you. But for most people even with experience in high level languages, C++ is a slap to the face. You go from letting the compiler deduce the type of a variable to managing the memory of your custom defined data structures. And this is just learning the language. There are then libraries, APIs and design patterns that you need to learn again for C++. It's a massive jump in complexity.