There is a trick on Objective C that you can use to suppress all NSLogs you have used on your project from the final release.
The trick is adding this to the .pch
file:
#ifndef DEBUG
#define NSLog(...) /* suppress NSLog when in release mode */
#endif
is there a similar trick to suppress all cout?
I have couts like this:
cout << "number: " << source->count() << endl;
or
cout << "file error";
etc., that are used under debugging but I would like to strip from final release. I don't want cout to print anything on the final release.
Is there a way to do that from the .pch
file or something globally like that?