I wanted good ways to deal with pointers to 2D arrays in C, which aren’t hard but you need to remember that [] has precedence over *, so (*pointer)[x][y] is needed to deference. It’s not the hard to mess it up. Ultimately GPT had an OK answer but… it had that immediately without searching and the didn’t have to craft some well written example, it picked up my dirty explanation no problem.
I have the 2D array typedef’ed now, but it’s still confusing to read and hard to work with. I’ll search tomorrow on it.
Asking anything C or C++ on SO has become an invitation to a ritual hazing. If, after dealing with everyone's ego, you can successfully demonstrate that you already know enough and you're not asking to pass a CS test, the Wise Ones may - may - deign to bestow you with an answer. Which usually won't relate to your specific issue.
Also, in C++, you can set your clock to someone commenting that you should just use smart pointers. It doesn't matter if the question is entirely unrelated.
As someone who spent a decade helping people answering code questions on Flashkit and later SO, I find the SO community and moderation now to be so off-putting that I avoid asking anything there if I can. I still give answers sometimes, but I'm much less likely to be on the site at all.
I wanted good ways to deal with pointers to 2D arrays in C, which aren’t hard but you need to remember that [] has precedence over *, so (*pointer)[x][y] is needed to deference. It’s not the hard to mess it up. Ultimately GPT had an OK answer but… it had that immediately without searching and the didn’t have to craft some well written example, it picked up my dirty explanation no problem.
I have the 2D array typedef’ed now, but it’s still confusing to read and hard to work with. I’ll search tomorrow on it.