typedef struct {
int error_code;
const char* func_name;
} cfunc;
cfunc do_math(void);
cfunc process_data(void);
cfunc do_math(void) {
cfunc result = {0};
result.func_name = __func__;
if (result.error_code) {
return result;
}
result.error_code = 0;
return result;
}
cfunc process_data(void) {
cfunc result = result.func_name; //i wanna somehow do get this
cfunc result = do_math(); //so the user does not need to pass func name themselves
if (result.error_code) {
return result;
}
result.error_code = 0;
result.func_name = __func__;
return result;
}
#can this be done with macros?
9 messages · Page 1 of 1 (latest)
When your question is answered use !solved or the button below to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
ahh i cannot do this its basic information flow lol
Thank you and let us know if you have any more questions!
This thread is now set to auto-hide after an hour of inactivity