std::out_of_range error?

I’m dealing with a file with a linked list of lines with each node looking like this: and I’m writing a function that adds spaces at the beginning of the lines found in the variable text, by calling functions like linelist_ptr->text.insert(0,1,’\t’); The program compiles, but when I run it I get this error: Any ideas?