when i do: IsOperator(strinput[uintStringIndex+1])=='='
why i get these warning:
"comparison of constant ''='' with boolean expression is always false [-Wbool-compare]"
???
IsOperator, I assume, returns a bool. This can only be true (1), or false (0). '=' is a char, which evaluates to some positive number greater than 1 (in this case, 61).
0 or 1 can never equal 61, so the expression will always be false!
I think you're making this more complicated than necessary. Why not just do, if (strinput[index+1] == '=') { /* logic... */ }
or bool isEqualsSign = (strinput[index+1] == '=');
BTW, make sure not to go out of bounds of your string, those +1's can be dangerous.
Well, I'm not sure. I would rework whatever it is you're doing. I don't understand what you're trying to accomplish with such a function, regardless of the name. See edit of a better bool IsOperator, btw.
The way you're using IsOperator seems redundant, I don't see why you don't just do (strinput[i] == '=').
Edit: However, I wouldn't say "terrible". std::find is still linear complexity. Sure, my example allocates the string each call, I agree that could be made static. I also agree that "std::find" makes more sense from an English-language point of view than "any_of", but I don't see this as a huge deal. If we really wanted to pre-optimize this, I'd go with binary_search, http://www.cplusplus.com/reference/algorithm/binary_search/ and hardcode the char array as sorted.