std::out_of_range thrown when parsing a text file

I have the following code to read a text file. const string FILENAME = PACKAGES_DIR + pname; //the arguments to ifstream is a cstring and hence the conversion must be made ifstream freader; ...

Relevant tags