You must log in or register to comment.
You don’t need to cast the return value from malloc.
This isn’t malloc though. I have to assume the cast is because the user has experience with the output from an LLM being untrustworthy.
From my experience with ChatGPT:
- It will NEVER consistently give you only the value in the response. It will always eventually add in some introductory text like it’s talking to a human. No matter how many times I tried to get it to just give me back the answer alone, it never consistently did.
- ChatGPT is terrible with numbers. It can’t count, do math, none of that. So asking it to do byte math is asking for a world of hurt.
If this isn’t joke code, that is scary.
I refuse to believe you are not certain this is a joke
I know it is, but I’ve also seen people try to use ChatGPT for similar things as a serious endeavor.
Friendly reminder that CalcGPT exists
it’s keep showing “api error”
Well to solve problem 1, you can just ignore all non-digit characters in the response :D




