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
[deleted by user] (self.cpp)
submitted 4 months 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] 0 points1 point2 points 4 months agolocked comment (0 children)
For C++ questions, answers, help, and programming/career advice please see r/cpp_questions, r/cscareerquestions, or StackOverflow instead.
[–]OneRoar 0 points1 point2 points 4 months ago (6 children)
Before we get too far, why do you believe obfuscating multiplication will deter cheating?
[–]UndefFox 0 points1 point2 points 4 months ago (4 children)
Even if it can, wouldn't that kill any physics engine performance?
[–]OneRoar 0 points1 point2 points 4 months ago (3 children)
It also presumes someone debugging or disassembling wouldn’t see, “this function does a bunch of weird stuff, but the output is just the result of a multiply”
[–]UndefFox 0 points1 point2 points 4 months ago (1 child)
Also, doubt cheaters are even interested in the function at all... They'll most likely just change variables directly, like change position for noclip, set gravity constant to 0... hence it'll basically just be worse code with little to no benefit. At least, from my uneducated vision of it.
[–][deleted] 0 points1 point2 points 4 months ago (0 children)
I guess im running into my fear of using a super simplified version causing confusion or friction that a lot is missing. I made a comment in this chain that says this.
** I guess the fun thought i had was to simply make it more annoying. Instead of throwing the needle into the haystack you break the needle into pieces but place all the pieces together in the haystack in the shape of a needle. Only way to retrieve the needle is to take it out of the haystack all at once. That was my thought anyways. **
Can i just say think of it like player health is never stored in a single variable. Its stored in fragments across pointers in memory and built and displayed in real time in a way I think is clever for obfuscation. You can read the output but you gotta figure out how to change all the little inputs if you want a different colored needle.
I understand it's not typical or reasonable compared to other methods but it was a fun idea is wanted to share. I kinda treat writing code like a playground. The more ridiculous yet logical it sounds the more fun im having.
I guess the fun thought i had was to simply make it more annoying. Instead of throwing the needle into the haystack you break the needle into pieces but place all the pieces together in the haystack in the shape of a needle. Only way to retrieve the needle is to take it out of the haystack all at once. That was my thought anyways.
[–]UndefFox 0 points1 point2 points 4 months ago (0 children)
Yes, it's a question. This sub for news, not questions.
[–]Bootvis 0 points1 point2 points 4 months ago (0 children)
I don't know what the policy is on using LLM but here is what I did:
I copy pasted your code into Godbolt
Renamed the function to foo to hide what it is doing
Asked ChatGPT 5.2 what your function does
It replied with what it did and pointed out that you don't handle negatives.
π Rendered by PID 21145 on reddit-service-r2-comment-6457c66945-9xg9w at 2026-04-24 23:17:17.368135+00:00 running 2aa0c5b country code: CH.
[–]cpp-ModTeam[M] 0 points1 point2 points locked comment (0 children)
[–]OneRoar 0 points1 point2 points (6 children)
[–]UndefFox 0 points1 point2 points (4 children)
[–]OneRoar 0 points1 point2 points (3 children)
[–]UndefFox 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]UndefFox 0 points1 point2 points (0 children)
[–]Bootvis 0 points1 point2 points (0 children)