I have a c++ program that handles serial communications. At this stage, serial settings (ports, baud rate, settings) are hard-coded into the program.
I'd like to re-build the program so that it will take in options/flags to control each of the settings, such as
the command above will listen on COM5 at rate 115200
c:\user\command.exe -p 5 -r 115200
I've been reading about command line arguments, and I've tried to play with it like this:
butswitch statement doesn't allow checking char data type.
int main(int argc, char **argv)
any insight will be so helpful!!