Hayim Shaul wrote: > But this is very tiring. > I created a MACRO > > #define LOG if (logger->is_activated()) logger->print > > and use it: > LOG("%d\n", ackerman(5,5)); How about: #define LOG(fmt, ...) if (logger->is_activated()) \ logger->print (fmt, ## __VA_ARGS__) Note that using ## here is a gcc-specific extension that allows for calling LOG("foo") without following parameters, which would otherwise cause an error under C99. Brian