A few days ago I tried using ChatGPT (latest version on the website) to write a really simple C++ class. Very simple. It showed some code that had comments that described it doing what I wanted, but the actual code was not valid C++. I pointed out exactly what was wrong and it wrote new code, that had even more comments, like
// 100% verified to compile and run
and it also wasn't valid C++ and of course wouldn't compile.
I gave it a few more chances and each time it would produce more elaborate code that was more invalid than the times before.
It's obviously just a plausible bullshit generator. That's what we've been saying for years, and evidently it's not something they can fix or improve on because that's fundamentally how they work.