This works:
This does not, I get seg faultCode:void myfunction( const char *file,const char *function, int index, int value ) { // code } #define myfunction(...) myfunction( __FILE__, __func__, __VA_ARGS__ )
I'm trying to create one string with information about the file and hide this fact from the callers using my function. This is so if i'm debugging i can trace a problem faster.Code:void myfunction( const char *info, int index, int value ) { // code } #define myfunction(...) myfunction( strncat(__FILE__, __func__, strlen(__func__)), __VA_ARGS__ )



LinkBack URL
About LinkBacks



