I need help loading a file line by line into a string vector. My program keeps crashing as soon as it opens and i am not sure if i am doing it correctly. Please let me know what i am doing wrong and point me in the direction of correcting it. The idea is every line of text in the text file gets a spot in the vector, so first line of text would be in vector position [0], second in position [1], etc.
I not that good with c++ but I believe that the fstream only handles *.txt. I don't know how to make it support other file extensions but someone else might.
no, the fstream supports the file i am calling for. I am able to take away the whole array thing any just put cout << line << endl; and it displays every line in the text file when i run the program. The program is loading correctly, i just dont know how to assign it to an array.