r/cpp_questions • u/Admirable_Barber_357 • 3d ago
OPEN I began coding with C++, should I continue learning it or should I drop it and start something else?
I have always wanted to learn coding and make games, but I didn't know what to do and how to start. About 4 years ago, I saw Sololearn's ad on Youtube (I'm not advertising them). Desparate to learn, I installed it. First, it asked me a few questions regarding why I want to learn coding, what I'm going to use it for (web designing, game development, ...), etc. After answering them, I got suggested learning C++, so I did. I finished the introduction course and learned about half of the intermediate course (if I remember correctly, the last thing I learned was separate files for classes).
Recently, I found out via social media that C++ is the worst language to learn as your first language. I am pretty comfortable with the syntax, but I do sometimes forget complex things like pointers, constructors and deconstructors, etc, because I don't have the time to code often. I have made a lot of small projects, and I'm currently working on a terminal version of Minesweeper that outputs the game board in colored text and is played via inputting the X and Y coordinates of the tile that you want to open or flag (I don't know how to make buttons, or programs with separate windows in general.)
I wanted to know if I should continue learning this language or should I drop it and learn something else, like Python?
Also, I have recently started working with Git, and I find it pretty complicated and hard to use. It would be nice if someone told me whether I should continue learning and using it or if it is too early and I should finish learning the language first.
(P.S.: Many apologies for my imperfect English; I'm not so good at writing and speaking, as it isn't my native language.)
32
u/LoquatNo3841 3d ago
"C++ is the worst first language" is honestly a myth. Yes its harder than for example Python, but it also teaches you way more stuff. You learn about memory management, headers, static typing, build systems and many more things you will need in your career. Harder yes but also teaches you way more. Git is really just a few commands u memorize, its not as hard as it looks,
Choose a language based on what you like and wish to learn, not based on what social media thinks is "the best for beginners"
14
u/GoatyGoY 3d ago edited 3d ago
C++ can be overwhelming to a beginner, but if you already managed to get going with it, you might as well continue. You will learn a lot of good programming concepts that can even help with so called “easier” languages.
The quintessential example is types. If you’re not used to them, they can seem irritating - but as you develop as a programmer, you realise that actually in most places not knowing the type is the conceptually hard case to handle.
4
u/mredding 3d ago
I'm 43, and I can tell you your English is better than most American native speakers, so you never have to criticize yourself about that ever again.
C++ was approximately my first language, too (I was ~9 years old, back in 1980-something).
The only "language" on Earth I've ever despised was SAS, a commercial data analytics package that can die and be replaced by R. Even at the UIC School of Business the professors there who teach it say the #1 way to get anything done is to call the SAS Institute and have THEM write it for you. What a pile of shit.
Other than that, people can keep their opinions to themselves, and don't you worry about them.
Paul Graham says there are 9 abstractions, and all programming languages are combinations therein (if you have all 9, you're a Lisp dialect). So you're learning some of the abstractions in C++, and that knowledge will transfer to other languages.
Pointers are a complex topic indeed, and I only made certain realizations about their nature +30 years into using them. You're in good company, because a lot of people get hung up on them. Think of it as an exercise in managing complexity. This is jumping jacks for your brain.
No, you don't have to memorize everything, you need to have a BASIC understanding and a good reference on hand. I have cppreference.com as a pinned tab in my browser, AND I have it downloaded, at work I have my AI models trained on it.
Abandoning C++ means adopting a whole other language. You don't have to learn loops and variables again, but you'll have to learn the syntax in this new language. It's not COMPLETELY starting over, but for where you're at, it's going to FEEL that way. And you speak of limited time? There are no languages that are that easy that are time budget friendly. Maybe Python, but Python has 8 language abstractions, it's ALMOST a Lisp, and you'll struggle to understand it deeper than a surface level scripting language. Javascript is damn simple, but the ecosystem is huge and requires tooling, the frontend, the backend, NVM, NPM...
I'm just saying jumping around might not be the solution you're looking for, but jumping around out of curiosity and perspective is itself valuable. I want you to have the right expectations so you don't frustrate yourself out of your hobby with disappointment.
ISO Standard C++ doesn't have any notion or support for GUI programming, but it does allow non-standard extensions. In other words, if you want a GUI, you have to get platform specific. Luckily, there are libraries for writing GUI applications across platforms, and I recommend THAT.
wxWidgetsis a good, mature library for doing that; GUI programming is a whole new "event driven" paradigm you're likely not used to, so you'll have to learn that. IO doesn't come fromstd::cinandstd::cout.1
u/Raknarg 3d ago
If you want to get into the gaming industry, C++ is a common language used for those heavy AAA games
Its weird to say its the worst. It certainly has its challenges in that I would say it has a higher floor because there's a lot more you have to learn to get comfortable with it and the language is massive. Python is comparatively simpler, building and running python projects is usually as simple as just get the python command line tool and run whatever file you want to run, C++ has a more complicated build process. But thats only a problem if having to learn a lot at once is a gate for you, if it isn't then C++ isn't any worse than any other language, and realistically if you're new to programming the biggest hurdle will be learning programming and dessign which is mostly just language agnostic.
If you're having a good time with C++, then just stick with it since you've already gotten started and it will be more relevant to you in the gaming industry than Python.
6
u/AnonymouSfrrrr 3d ago edited 3d ago
Continue bro it is worth it. Even now c++ is most used language in game dev. Gta 6 also used c++.
3
u/montymole123 3d ago
Keep learning C++ and git
2
u/Disastrous-Team-6431 3d ago
I'm going to go against the grain a little bit, I think. Firstly: I love c++ and definitely think you should learn it. But I think when evaluating "is this a good first language", a good question to ask is "what about the concepts I'm learning is specific to this language".
For c++, I think that's a solid 3/5 score for "necessary learning I will not use outside the language". For haskell it would be 5/5 almost. C++ has you learning about a bunch of stuff, mainly related to its compilation scheme but also other things, that don't really generalize.
For python, often touted as a great beginner language, this is near zero. Everything you learn in python is generalizable to some other programming languages. But, python won't teach you a lot of things you need to learn about, either.
So my recommendation is to go with c++, but for a slightly different reason than I've seen articulated; go with it because you know you want to work in an industry where it's ubiquitous. But in my view, have your eyes open to the frustrations you're going to run into: a lot of c++ bullshit is emphatically just c++ bullshit, even though people will try to convince you that you're learning something valuable.
2
u/Discordbothost 2d ago
I'd finish the terminal Minesweeper. Put the reveal and flag rules in a Board class and keep terminal input and printing outside it. When you're ready to try a window, a mouse click can call the same reveal function your typed coordinates use.
3
u/js884 3d ago
If you want concepts i found python is good for that, no memory stuff, less syntax {, ; etc.
Could keep up some C++ though so you don't lose syntax
2
u/alfps 3d ago edited 3d ago
It didn't have to be that way, but good learning materials for beginners using C++ in Windows appear to be non-existent. :(
And I know from experience trying to create some such materials, that it's inordinately difficult because
The C++ standard library still lacks a Unicode line input function. Unicode output functionality has been provided via
std::printin C++23, but input, nope, it's DIY... And in Visual Studio, the go to IDE choice for a beginner working in Windows, one still has to manually configure each project with the Visual C++ option/utf-8to makestd::printwork as intended. It's just an endless stream of technical hurdles, much of it Microsoft's fault, but also the C++ community's fault for not working around that.So I suggest temporarily dropping C++, teach yourself a good solid foundation with some other language with a more beginner friendly infra-structure in place, then get back to C++ for games programming etc.
Regarding Git there is a GUI "Github Desktop" that's real easy to use, and I mainly use that. Except for adding Git support to a project, for then I generally use a
git initcommand. You'll need Git for sharing, cooperation, and occasionally for restoring from backup (Github as your backup).You did exactly right by posting in English.
No need to apologize for doing The Right Thing™. :)
1
u/BoopyDog 1d ago
I learned C++ as my first serious attempt to learn a programming language. C++ was definitely difficult to gain a grip over. The standard library is large, and keeps growing larger every few years with [awesome] new functions and classes. STICK WITH IT and you will eventually know all of the tools that are useful for YOU.
Word of advice: you need to begin the process of learning how to use third party libraries in your projects ASAP. Otherwise you'll be stuck wasting a lot of time trying to dig your self out UP from really low level coding rather than doing it the other way around, which is much more satisfying.
Like me, you will benefit A LOT from learning to use a graphics library like RAYLIB, QT, SFML or SDL3. I recommend learning (or looking at) them in that order. You can get straight to opening up windows and setting up buttons with those abstracted libraries and then LATER, after you understand graphics programming at a higher level, you can crank up the resolution of your knowledge by learning how to use some lower level graphics libraries like GLFW + GLAD + OpenGL and then you can swap out the OpenGL parts with vulkan.
Also, begin looking into embedded programming with ArduinoIDE.
1
u/TrainingJellyfish643 19h ago
Nah its the best language tbh. But you gotta bust open some textbooks and learn OS concepts, compilers, computer architecture, and concurrency on a deep level if you wanna get real good and be super comfortable. To be an expert in c++ it helps to be an expert in computer science generally, everyone ive ever known who was top level at cpp is super knowledgeable and has put in an ungodly number of hours working on things.
Its good that it feels hard, because its not an easy language and you will have to tolerate that feeling of "wtf is this" for a long time, but if you stick with it and challenge yourself to build interesting things from scratch you will be very glad you did. And once you know a language like cpp you wont have much trouble going on to learn other things, and youll have a better understanding of what's happening under the hood
0
u/rororomeu 3d ago
In addition to some programming languages, frameworks, and libraries, make sure to learn how to use AI—specifically Claude—as a matter of urgency.
0
u/Admirable_Barber_357 3d ago
First, I'd like to thank everyone for kindly sharing their views and experiences; this was my first Reddit post, and I didn't expect much from it. Second, I would like to mention that I have little to no knowledge on expressions and phrases that programmers use. I wanted to know if there is a specific place where I can learn them or if I will get familiar with them over spending time in coding comunities.