4 ms·
If that char* is just a pointer into a static array which maps error codes to strings, I'd generally prefer to use a separate API to do that. If it's a freshly
by TillE 12y ago
If that char* is just a pointer into a static array which maps error codes to strings, I'd generally prefer to use a separate API to do that.
If it's a freshly allocated string that needs to be freed by the caller, well, that's one of many reasons I never enjoy my time with C.