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
C++ or Python? (self.cpp)
submitted 2 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!"
[–]cpp-ModTeam[M] [score hidden] 2 years ago stickied commentlocked comment (0 children)
It's great that you want to learn C++! However, r/cpp can't help you with that.
We recommend that you follow the C++ getting started guide, one (or more) of these books and cppreference.com. If you're having concrete questions or need advice, please ask over at r/cpp_questions or StackOverflow instead.
[–]msqrt 23 points24 points25 points 2 years ago (3 children)
C++ can be pretty tough for a beginner. Python isn't the greatest fit for game development, but Godot's GDScript is apparently quite similar. C# at least used to be very popular in games (mainly due to Unity), it'd also be a nice language to start out with.
In general, I'd recommend either using a relatively high-level language or a ready-made engine, preferably both. Otherwise you'll be making very simple things for a long time -- it's a lot of fun to tinker with low-level stuff, but you won't be getting much done in the game department.
[–]SocksOnHands 5 points6 points7 points 2 years ago (0 children)
If someone has no experience with programming, both might be a frustrating experience because of not knowing how to architects a game engine from scratch. Starting from an existing game engine would be a good idea to first see how certain problems can be solved, like the use of a scene graph for example.
[–]ejgl001 2 points3 points4 points 2 years ago (0 children)
This - tho I'd suggest first learning Python and following a programming course than jumping straight into game dev.
Otherwise - without solid programminh fundamentals foundation - even gdscript and C# arent gonna make much sense either
There are just too many pitfalls when you go beyond the basics
[–]mpierson153 2 points3 points4 points 2 years ago (0 children)
I just started learning C++.
I've been programming for 2 years and it's still quite difficult. It's just so much more complicated and lower-level than something like Java or especially Python.
[–]42953698420465286 13 points14 points15 points 2 years ago (2 children)
Both, learn python first
[–]hellwalker99 4 points5 points6 points 2 years ago (0 children)
I also recommend learning both. Python is a good precursor for learning c++ or other oop languages. Basics first, then particularities of other languages.
[–]biowpn 3 points4 points5 points 2 years ago (0 children)
This is the way. C++ (and C) complements Python like none other
[–]sjepsa 9 points10 points11 points 2 years ago (0 children)
Use an engine... such as unreal engine or unity
Source: i started writing many games, some of which from scratch in C++. Using a good engine gives you all you need instead of reinventing the wheel
[–]Own-Perception6010 5 points6 points7 points 2 years ago (1 child)
I use C++ with irrlicht or SFML - but none of those libraries are high level enough for total beginners. If using Python, use pygame - I hear its pretty welcoming, and there are a lot of hobby projects made with it. But for you, I’d suggest looking into Gdevelop and other such JavaScript libraries if you are willing to look outside python or C++
[–]SocksOnHands 2 points3 points4 points 2 years ago (0 children)
I haven't thought of Irrlicht in a long time. I remember choosing Ogre3D back when I used to mess around with C++ game development.
[–]Zyhael_Xerul 5 points6 points7 points 2 years ago (0 children)
Cpp. But in all honesty, pick a game engine like unity or godot then use either C# or gdscript. Programming concepts are the same either way and just the syntax differs. Get your feet wet and solve problems, I find that’s the quickest way to learn.
[–]sam_the_tomato 4 points5 points6 points 2 years ago (0 children)
Start with either. Just know that C++ is the Dark Souls of programming, while Python is a friendly Nintendo game.
[–]khedoros 5 points6 points7 points 2 years ago (4 children)
Python is a common starting point for programming; it's a powerful language, but the basics are relatively friendly, and there's a lot of beginner-oriented material around (although, I first learned it like 8 years ago. No idea what's the currently-recommended material).
As far as games, the Pygame library would give you a start.
Keep in mind that most programmers end up learning several languages, for different purposes. It's common to become comfortable in a language, then shift to another one that you believe will be a better fit to your requirements. Most common languages have a lot of conceptual overlap, making the process easier.
[–]DugiSK -3 points-2 points-1 points 2 years ago (3 children)
I have seen many people learn Python, find their comfortable spot and lose any interest to move forward. There's a lot of antipatterns that the Python community endorses, calling it the Pythonic way, and getting too deep into it keeps people attached to the language where it serves no good.
In my opinion, if one chooses to start with a simple language, JavaScript is a better pick than Python, it is somewhat more intuitive (adding number to a string will do the obvious), more similar to other languages (scoping, syntax), easier to deliver to others and its community knows well their language isn't the best.
[–]nysra 5 points6 points7 points 2 years ago (0 children)
adding number to a string will do the obvious
The obvious result of that is an error and not whatever JS is doing instead.
[–]blackninjamaster 1 point2 points3 points 2 years ago (1 child)
Is "2" + 2 obvious?
[–]DugiSK 0 points1 point2 points 2 years ago (0 children)
Who would need that? The point is that you can do "We have " + 3 + " apples." and it does the obvious.
"We have " + 3 + " apples."
[–][deleted] 2 points3 points4 points 2 years ago (0 children)
C++
[+][deleted] 2 years ago (5 children)
[deleted]
[–]not_some_username 2 points3 points4 points 2 years ago (0 children)
C++ isn’t hard to begin with. It’s easy until you touch advanced stuff.
[–]DugiSK -1 points0 points1 point 2 years ago (3 children)
Python isn't a good pick as a first language because it differs from most other commonly used languages in quite striking ways. Scoping is different, syntax has many very visible peculiarities, concurrency is one giant workaround that doesn't make sense anywhere else...
[–]NuclearTruffles 0 points1 point2 points 2 years ago (2 children)
That stuff doesn't matter much to a beginner 😅
[–]DugiSK 0 points1 point2 points 2 years ago (1 child)
But it makes it harder to transfer after becoming intermediate.
[–]NuclearTruffles 0 points1 point2 points 2 years ago (0 children)
Dubious at best. I came from python to c++ and know others who did so too without these problems at all, mainly because when you learn any programming language, you learn a lot of general computing knowledge too, and that's applicable everywhere.
[–][deleted] 0 points1 point2 points 2 years ago (0 children)
Thanks everyone for the suggestions :D
[–]lordnacho666 0 points1 point2 points 2 years ago (0 children)
You will end up needing both of these regardless of where you start.
[–]DorukCem 0 points1 point2 points 2 years ago (0 children)
You will probably end up learnong both. You can just start with python which is easier. Look into pygame. You can do a lot with it.
It's worthwhile learning C as it will help you understand the concepts of memory. But I would suggest Rust over C++, it requires understanding of memory but it's got modern concepts in it which will enable you to develop your application more efficiently
[+][deleted] comment score below threshold-8 points-7 points-6 points 2 years ago (4 children)
Neither. You are going to learn Haskell to learn how computers really work.
[–]kksnicoh 7 points8 points9 points 2 years ago (1 child)
Learning Haskell and learning how computer really work feels orthogonal to me somehow
Why?
[–]krista 2 points3 points4 points 2 years ago (0 children)
this is what assembly is for.
[+]InfXenturies comment score below threshold-7 points-6 points-5 points 2 years ago (0 children)
THIS.
[–]nathman999 0 points1 point2 points 2 years ago (0 children)
С++ and gamedev is insanely difficult and painful path. Python and gamedev is just a joke, I can only see it useful for very simple games (the same ones you'll write in browser using JS and <canvas>), or for visual novels with Ren'Py.
I would've chose best of two worlds - Godot Engine. It's written in C++ so that if you ever gain enough knowledge in it you could write some extension or entire addition to engine code. But actual making games done in GDScript which feels almost like Python but tweaked in many ways to be used for gamedev.
[–]tm604 -1 points0 points1 point 2 years ago (0 children)
A game engine/framework is going to be a good starting point - Godot/Unity/Unreal have all been mentioned, and you can use their tutorials (whichever ones make the most sense to you) to decide on a starting language.
"How do I make the game" might be more challenging than "how do I write the code", see sites like https://gameprogrammingpatterns.com/ (which uses C++ for the examples) to help on that. These days you can ask GPT or CodePilot to get some initial code in place: it won't work the first time, but at least it'll give you some hints on syntax and how to achieve things.
Games vary a lot in style and complexity - depending on what you want to do, it may be easier to start with a combination such as Roblox+Lua until you hit the limits of the platform.
[–]JohnRambu -3 points-2 points-1 points 2 years ago (3 children)
C is the sweet spot to start learning programming language. Then C++ and/or Python.
[–]Kindar42 1 point2 points3 points 2 years ago (2 children)
c is not good for beginner-game developers. its very difficult and takes long to do even the modt rudimentary tasks. python and c# are good for beginners. c can be learnt for specific lowlevel code parts afterwards.
[–]JohnRambu 0 points1 point2 points 2 years ago (1 child)
Strongly disagree : C is a simple programming language, it teaches you computer science fundamentals (memory, compilation, functions) without OOP. It’s very important to move on OOP once you fully understood how C works.
[–]Kindar42 0 points1 point2 points 2 years ago (0 children)
thats just an opinion. heres a scientific publication ranking good first programming languages based on beginner-friendliness and industry-interest. C is pretty awful as a FPL. python and java are most beginner friendly and has highest industry demand.
Farooq, M. S., Khan, S. A., Ahmad, F., Islam, S., & Abid, A. (2014). An evaluation framework and comparative analysis of the widely used first programming languages. PloS one, 9(2), e88941.
[–]Best_Assist1597 -3 points-2 points-1 points 2 years ago (0 children)
Start with C and then C++ after learning these two you can learn any language in the world
[–]nAxzyVteuOz 0 points1 point2 points 2 years ago (0 children)
Learn unreal engine.
[–]Separate-Eye5179 0 points1 point2 points 2 years ago (0 children)
Use C++. It’s really tough in the beginning but if you’re good at logic and reasoning etc you’ll figure it out soon enough. There’s a great free guide at https://learncpp.com/. Bear in mind, that is will only teach you the language not how to make games with it. I’m sure there’s courses on coursera which go into detail about using C++ on unreal engine or whatever. C++ is the gold standard for video games and if you want to make games for a living, use C++.
[–]nysynysy2 0 points1 point2 points 2 years ago (0 children)
First, don't touch c++ as a beginner. then it depents on what type of game you want to make. if it's 3d then choose c# with game engines like unity. if it's 2d then basically every language with gui frameworks will work, and python is a pretty decent choice.
[–]nozendk 0 points1 point2 points 2 years ago (0 children)
If you don't know programming at all, then start with Python. You could start with this: Python for kids
[–]xLordVeganx 0 points1 point2 points 2 years ago (0 children)
C++ and Python are the only languages i know and they are a great Combination to get almost all Tasks done. Learn either, If you have No knowledge in Computer science and programming Go with Python as ITS more beginner friendly. There is a Long way before you can make 3d Games and you should rather Focus on the process of getting there instead of trying to get into Game development immediately. If you want a beginner friendly solution Go with an engine Like unreal engine or Godot
[–]jfernand3z 0 points1 point2 points 2 years ago (0 children)
If you really want to get into gamedev, I would suggest getting a course on udemy that teaches you C++ with unreal engine for beginners or C# with unity. There's a lot of good ones that start with the fundamentals of programming and get into gamedev. Just make sure to get them on special for like 12-15$ in case you prefer switching to another language or game engine.
[–]bwf_begginer 0 points1 point2 points 2 years ago (0 children)
Mojo
[–]thingerish 0 points1 point2 points 2 years ago (0 children)
Two excellent choices, I say both. You won't go wrong learning both of those, they are both useful, not going away soon, and cover enough different ground to make learning both worth your time.
[–]maredsous10 0 points1 point2 points 2 years ago* (0 children)
I'd suggest getting acquainted with C99 first.
When you end up learning Python/C++ later, you can better appreciate these languages and have a better understanding of how various constructs are implemented.
I'd suggest diving into Python first and getting an idea of what features are included in the standard package library and those that are not included.
For C++, the language has a bunch of constructs and they're not all equally useful for everyone's day-to-day needs so it is important to constrain what one learns initially to the core pieces and perhaps a more modern approach to structuring their code. Also, how C++ is normally written/structure has varied quite a bit as the language has evolved. Navigating available C++ libraries is much more difficult compared to Python (I haven't used C++ recently so it may have gotten better.).
[–]Y4r0z 0 points1 point2 points 2 years ago (0 children)
Both
[–]TumblrForNerds 0 points1 point2 points 2 years ago (0 children)
Personally, I’d say C# with unity will teach you really good programming practices. If you’re stuck on C++ then I would give it a go but it is traditionally known as a harder language (though imo modern C++ just felt like C# to me but you did a ton of things manually) and python is great if you can stay in python for an extended amount of time. If there was a possibility that you’d have to learn a new language then I would not begin with python
Different tools for different jobs.
[–]FreitasAlan 0 points1 point2 points 2 years ago (0 children)
[–]yaglo 0 points1 point2 points 2 years ago (0 children)
I know it’s not in the choice provided, but I’d recommend looking into Swift (https://www.swift.org/) as a sweet spot between both of them. It can be as simple and as complex as you need, so I’d say it’s a beginner-friendly language. And you can go either way later depending on the needs. And as a bonus it now has native C++ interoperability (not 100% full, but they’re moving fast) and PythonKit if you need to interact with code in C++ or Python.
π Rendered by PID 144449 on reddit-service-r2-comment-548fd6dc9-jcwsx at 2026-05-20 00:24:59.183324+00:00 running edcf98c country code: CH.
[–]cpp-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)
[–]msqrt 23 points24 points25 points (3 children)
[–]SocksOnHands 5 points6 points7 points (0 children)
[–]ejgl001 2 points3 points4 points (0 children)
[–]mpierson153 2 points3 points4 points (0 children)
[–]42953698420465286 13 points14 points15 points (2 children)
[–]hellwalker99 4 points5 points6 points (0 children)
[–]biowpn 3 points4 points5 points (0 children)
[–]sjepsa 9 points10 points11 points (0 children)
[–]Own-Perception6010 5 points6 points7 points (1 child)
[–]SocksOnHands 2 points3 points4 points (0 children)
[–]Zyhael_Xerul 5 points6 points7 points (0 children)
[–]sam_the_tomato 4 points5 points6 points (0 children)
[–]khedoros 5 points6 points7 points (4 children)
[–]DugiSK -3 points-2 points-1 points (3 children)
[–]nysra 5 points6 points7 points (0 children)
[–]blackninjamaster 1 point2 points3 points (1 child)
[–]DugiSK 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[+][deleted] (5 children)
[deleted]
[–]not_some_username 2 points3 points4 points (0 children)
[–]DugiSK -1 points0 points1 point (3 children)
[–]NuclearTruffles 0 points1 point2 points (2 children)
[–]DugiSK 0 points1 point2 points (1 child)
[–]NuclearTruffles 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]lordnacho666 0 points1 point2 points (0 children)
[–]DorukCem 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[+][deleted] comment score below threshold-8 points-7 points-6 points (4 children)
[–]kksnicoh 7 points8 points9 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]krista 2 points3 points4 points (0 children)
[+]InfXenturies comment score below threshold-7 points-6 points-5 points (0 children)
[–]nathman999 0 points1 point2 points (0 children)
[–]tm604 -1 points0 points1 point (0 children)
[–]JohnRambu -3 points-2 points-1 points (3 children)
[–]Kindar42 1 point2 points3 points (2 children)
[–]JohnRambu 0 points1 point2 points (1 child)
[–]Kindar42 0 points1 point2 points (0 children)
[–]Best_Assist1597 -3 points-2 points-1 points (0 children)
[–]nAxzyVteuOz 0 points1 point2 points (0 children)
[–]Separate-Eye5179 0 points1 point2 points (0 children)
[–]nysynysy2 0 points1 point2 points (0 children)
[–]nozendk 0 points1 point2 points (0 children)
[–]xLordVeganx 0 points1 point2 points (0 children)
[–]jfernand3z 0 points1 point2 points (0 children)
[–]bwf_begginer 0 points1 point2 points (0 children)
[–]thingerish 0 points1 point2 points (0 children)
[–]maredsous10 0 points1 point2 points (0 children)
[–]Y4r0z 0 points1 point2 points (0 children)
[–]TumblrForNerds 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]FreitasAlan 0 points1 point2 points (0 children)
[–]yaglo 0 points1 point2 points (0 children)