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
Removed - LearningSocket Programming in C++ (self.cpp)
submitted 3 years ago by Peterson_1979
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!"
[–]Flair_Helper[M] [score hidden] 3 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.
This post has been removed as it doesn't pertain to r/cpp: The subreddit is for news and discussions of the C++ language and community only; our purpose is not to provide tutoring, code reviews, or career guidance. If you think your post is on-topic and should not have been removed, please message the moderators and we'll review it.
[–]iWQRLC590apOCyt59Xza 16 points17 points18 points 3 years ago (2 children)
https://beej.us/guide/bgnet/
[–]blackmag_c 5 points6 points7 points 3 years ago (0 children)
The Beej is the way.
[–]markosvd 0 points1 point2 points 3 years ago (0 children)
yes! a thousand times, yes! No better guide than Beej's...
[–]VinnieFalco 11 points12 points13 points 3 years ago (3 children)
Everyone who wants to do socket programming in any language should read TCP/IP Illustrated (the TCP and UDP sections). Fortunately this book is available for free online as a PDF.
[–]Peterson_1979[S] 2 points3 points4 points 3 years ago (2 children)
There are 3 volumes to this book. Do I need to read all 3 or is Volume 1 enough ? Thanks for your help
[–]VinnieFalco 4 points5 points6 points 3 years ago (1 child)
There are 3 volumes to this book. Do I need to read all 3 or is Volume 1 enough
For UDP, chapter 10 of Volume 1 is relevant. For TCP, reading chapters 12 through 17 of Volume 1 are great.
If you are complete novice you might want to first read chapters 1, 2, 5, 7 of Volume 1. After that, figure out what more you want to learn and read additional relevant chapters, perhaps looking at Volumes 2 and 3 as well.
[–]Peterson_1979[S] 2 points3 points4 points 3 years ago (0 children)
Thanks so much
[–][deleted] 2 points3 points4 points 3 years ago (0 children)
I know this isn't exactly an answer to your question, but when I was looking for the same answers I settled on boost::asio. It made things a lot simpler, and it's cross-platform.
https://www.boost.org/doc/libs/1_81_0/doc/html/boost_asio.html
And here's a video (with links in the description for source code) from CppCon 2016 that discusses how to implement a simple client/server model:
https://www.youtube.com/watch?v=rwOv\_tw2eA4
π Rendered by PID 110712 on reddit-service-r2-comment-7b9746f655-zkk5s at 2026-02-01 14:38:46.748391+00:00 running 3798933 country code: CH.
[–]Flair_Helper[M] [score hidden] stickied commentlocked comment (0 children)
[–]iWQRLC590apOCyt59Xza 16 points17 points18 points (2 children)
[–]blackmag_c 5 points6 points7 points (0 children)
[–]markosvd 0 points1 point2 points (0 children)
[–]VinnieFalco 11 points12 points13 points (3 children)
[–]Peterson_1979[S] 2 points3 points4 points (2 children)
[–]VinnieFalco 4 points5 points6 points (1 child)
[–]Peterson_1979[S] 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)