It compiles correctly, but crashes at runtime. I have debugged and found that the problem was with file.getline(temp,numeric_limits<streamsize>::max(),']');
I changed the numeric_... max() to 100 and it did the same. I changed the delim char. Did the same. So I dont know what the problem is.

The exact error is: SFML2.exe has stopped working. Windows will close the program and notify you if a...