String Subscript Out of Range (Line 1662).

May 15, 2013 at 10:20am
Solved
Last edited on May 19, 2013 at 12:25am
May 15, 2013 at 11:20am
length = user_input.length(); Will save lenght of entire "Hello Everyone"
istringstream(user_input) >> inputString; Will read only "Hello"
So you have 5 characters string which you think is 19 characters long. Do not store length, Do not believe what other functions returns. Calculate it in place
May 15, 2013 at 4:07pm
It works! didn't realize that I won't need to use istringstream in the function. Thanks a lot MiiNiPaa!
Last edited on May 15, 2013 at 4:07pm
Topic archived. No new replies allowed.