string subscript out of range error

You are reading an index slowo.size() in slowo, but subscripting it 0-based, so slowo can only be indexed from 0 to slowo.size()-1. You need to change your condition to

if (j >= slowo.size())j=0;

Leave a Comment