how can you search threw a string more than once? im working on a program where you can type in options on the command line o type them when the program starts. how could i serach for the command flag and the arg?
why doesnt this work?
or better yet is there a way to take the input string and turn it into something argv in main?Code:while(input[x] != EOF) { if(input[x] == '-' && input[x+1] == 't') { x+= 3; while(input[x] != ' ') { temp[y] = input[x]; ++y; ++x; } } }