f0ur
Newbie
- Mar 6, 2019
- 25
- 11
Hello, world!
I kind of forgot this existed (not gonna lie), but I am slightly back. Ish. I have several questions regarding command line args and main, but first of all, story time (ish).
I am currently working on a program that uses a lot of command line arguments because the user needs to specify what flags and such they want depending on the architecture of the system that the program runs in. My issue that I am finding is that currently I have too many if-else statements checking these args, but I am confident that this is not at all efficient and well, a bit sloppy. I am thinking of creating another function that utilizes the switch-case cuz from what I have seen when case is used, it makes prettier code and also, easier to maintain and update. Any thoughts and suggestions are welcome.
~ Regards
I kind of forgot this existed (not gonna lie), but I am slightly back. Ish. I have several questions regarding command line args and main, but first of all, story time (ish).
I am currently working on a program that uses a lot of command line arguments because the user needs to specify what flags and such they want depending on the architecture of the system that the program runs in. My issue that I am finding is that currently I have too many if-else statements checking these args, but I am confident that this is not at all efficient and well, a bit sloppy. I am thinking of creating another function that utilizes the switch-case cuz from what I have seen when case is used, it makes prettier code and also, easier to maintain and update. Any thoughts and suggestions are welcome.
~ Regards