I had encountered an error inside for loop, if str.size() = 1 then it\'s throwing error as
terminate called after throwing an instance of \'std::length_e