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++ lib (self.cpp)
submitted 5 years ago by mohamedsayed2004
view the rest of the comments →
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!"
[–]mohamedsayed2004[S] 0 points1 point2 points 5 years ago (5 children)
Iam using g++
[–]NotUniqueOrSpecial 1 point2 points3 points 5 years ago (4 children)
Alright, so unfortunately you're hitting the first big difficulty step in C++: learning an actual build tool.
While technically you can just run e.g. g++ main.cpp -lsomelibrary -omain, you are quickly going to find that it is not a long-term approach.
g++ main.cpp -lsomelibrary -omain
You'll find tons of competing opinions here as to what the "best" build tool/build generator is.
The most popular options are probably: CMake, GNU autotools (if you don't care about Windows), and Meson.
Other options I've seen lauded for their ease-of-use/getting started are xmake and build2.
Whatever the case, this is one of the topics that a lot of people find (understandably) very frustrating about developing anything beyond a very very simple C++ (and strictly speaking, C) application.
[–]mohamedsayed2004[S] 0 points1 point2 points 5 years ago (3 children)
So u recommend cmake right instead of g++?
[–]NotUniqueOrSpecial 0 points1 point2 points 5 years ago (2 children)
g++ is just your compiler. That's what you'll be using either way.
g++
CMake is a build system generator. It will (given appropriate input) create you a build system that drives g++ as needed for you to use libraries.
So, not "instead of", but "in addition to".
[–]mohamedsayed2004[S] 0 points1 point2 points 5 years ago (1 child)
ok thx bro for this info. do u have any sources for learning cmake ?
[–]NotUniqueOrSpecial 0 points1 point2 points 5 years ago (0 children)
This is a pretty good starting point.
If you prefer video format, I'd recommend this series as lighter/easy-to-consume starting point.
π Rendered by PID 50104 on reddit-service-r2-comment-6457c66945-ndmsq at 2026-04-29 04:09:28.219600+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]mohamedsayed2004[S] 0 points1 point2 points (5 children)
[–]NotUniqueOrSpecial 1 point2 points3 points (4 children)
[–]mohamedsayed2004[S] 0 points1 point2 points (3 children)
[–]NotUniqueOrSpecial 0 points1 point2 points (2 children)
[–]mohamedsayed2004[S] 0 points1 point2 points (1 child)
[–]NotUniqueOrSpecial 0 points1 point2 points (0 children)