I use cout and printf for my debugging. However, when i want to run a "clean" code without cout messages
i have to comment out every single one. How can i turn on/off
example:
for(int i = 0 ; i < 10 ; i++){
cout << "=======================" <<endl ;
for(int j = 0 ; j < 5 ; j++){
cout << j " " ;
int sum = i + j ; //actual work
}
}
can i compile it somehow with a some option? like this: g++ main.cpp -no_log and it does not print any couts? How do developers do it in c++?