I am currently using command line inputs in conjunction with several hardware inputs from my io ousb board...
I am trying to execute code where my second command-line argument, 'c1' ,'c2' 'c3' or 'c4' executes the next part of my code that I've written. However, when I run the code, It only reads 'c', not 'c1'. Through debugging, it says there is an error in reading the characters of the string.
Each operator, like ==, has to be defined for its operands and no such operation is built into the standard for C-strings (your char arrays): for those you could use the strcmp() function to compare two C-strings, but it is more messy.
std::string is a well-defined class to hold character sequences that behaves naturally and has comparison-for-equality operations (==) defined for it, as well as the convenience of building up strings with a + operation.
Note that we can only see a few lines of your code, so it is not easy to comment, and you don't give the actual error message. It would also help if you put your code in code tags (first item on the format menu), as this would preserve indentation etc. and, for runnable code, allow us to compile and run it in an online shell.