cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
String Subscript Out Of Range
String Subscript Out Of Range
Jan 28, 2014 at 1:00pm UTC
Doggie
(4)
Solved! Thanks
Last edited on
Jan 28, 2014 at 9:06pm UTC
Jan 28, 2014 at 1:06pm UTC
Peter87
(11234)
The sizeof trick that you use to calculate the length only works on arrays. std::string has a size() member function that you can use instead.
http://www.cplusplus.com/reference/string/basic_string/size/
Topic archived. No new replies allowed.