Hi, I'm having trouble opening my file in visual studio. The fexists function returns true, but when gets to the loading in the file it gives me the following error: invalid NULL pointer. When debugging, it says error reading characters from string. The file in notepad looks like this: "1#2#3#4". Can anyone see a reason why this is occurring? Thanks!

#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <sstream>
using namespace std;

bool fexists(string filename)
  ifstream ifile(filename);
  return ifile;

int _tmain(int argc, _TCHAR* argv[])
	string location = "C:\\Users\\Brittany\\Documents\\Visual Studio 2012\\Projects\\ConsoleApplication9\\ConsoleApplication9\\Debug\\test1.txt";
	bool file_exists = fexists(location);
	ifstream my_file (location);
	int poundpos[12];
	string mystring;
\	int i = 0;
	string temp = 0;
	int add = 0;
	int temp1 = 0;
	int length = 20;
	while(getline(my_file, mystring))
		 //length = stoi(mystring.length);
		 istringstream liness(mystring);
		 for(i = 0; i < length; i++)
	       getline(liness, temp, '#');
		   temp1 = stoi(temp);
		   temp1 = poundpos[i];
		   add = poundpos[i] + add;

	cout << (add);
	return 0;