| MOSKing (13) | |||
|
Having my string inputted by the user. How would I find the position of the word the user entered? For example, user entered "How now cow" and they want me to find "cow" which would be position 3. I keep getting -1. Some of my code, terribly wrong:
| |||
|
|
|||
| TheIdeasMan (1562) | ||
|
You have look as an int - shouldn't it be a string? Find takes iterators as the first 2 arguments, the string as the 3rd.
Even though the example is an array of ints, you can use it for strings. HTH | ||
|
|
||