dimanche 30 décembre 2018

I am getting error like "expected identifier" when i try to use macros in my code

I have written a macros but when i use the code i get expected identifier error.

Below is my macros

#define ITK(arguments)  \
{                       \
    int iFail=0;        \
    iFail = arguments;  \
    if(iFail != ITK_ok) \
{                      \
    char* s;            \
    TC_write_syslog("Following Method Retruns error "#arguments "\n");\
    TC_write_syslog("Error is in the line [%d] of the file ["__FILE__"]\n",[__LINE__]);\
    EMH_ask_error_text(iFail,&s);\
    TC_write_syslog("And the error is [%s]",s);\
    if(s!=0) MEM_FREE(s);\
}                           \
}

Aucun commentaire:

Enregistrer un commentaire