I am creating a C++ program that takes arguments from command line. I want to implement a functionality that if in command line I give -v then the program spits out statements at every step of the process, If the -v is not given in the arguments, the program does not print.
One way of doing that would be to check at statement if the -v argument was given or not. This process, according to me is not scalable.
Is there any other way to do this?
Let me know if I need to add something else in the question.
Aucun commentaire:
Enregistrer un commentaire