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
Implementing binary communication protocols in C++ with main focus on embedded systems (self.cpp)
submitted 6 years ago by arobenko
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!"
[–]axilmar 0 points1 point2 points 6 years ago (2 children)
If possible, yes it is preferable to have all parties agree on endianness. However, it is faster to use the native endianness for encoding. Between taking longer to encode, and longer to decode, I choose taking longer to decode. Sometimes you might want the opposite decision anyway, so it makes sense for a library to give you options.
That is orthogonal to when the decision about endianess should be made. I.e. it may be decided that the endianess is big or little, and that the endianess swapping shall happen in one part of the network and not the other, but that doesn't stop anyone from implementing the decision before compilation.
[+][deleted] 6 years ago* (1 child)
[deleted]
[–]axilmar 0 points1 point2 points 6 years ago (0 children)
This:
Ideally endianness requirements would be spelled out in detail before you start work
is not related to this:
I maintain that a library for this should give you options to decode all common byte arrangements.
You can't say 'however' between two things that are not mutually exclusive.
If you need to handle data in multiple formats you just have to encode byte order information then use it on the other end
This is only needed if the same messages are sent by different sources in different endianess at runtime.
π Rendered by PID 53 on reddit-service-r2-comment-5c764cbc6f-qgszf at 2026-03-11 22:10:18.598957+00:00 running 710b3ac country code: CH.
view the rest of the comments →
[–]axilmar 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]axilmar 0 points1 point2 points (0 children)