Its obvious from the fle contents that atoi() won't work because the file contains a mixture of text and numbers. And since that is NOT a comma-separated file attempting to read up to the comma will fail. As Salem mentioned the columns must be separated by tabs or just simply spaces.
here is a way to do it without any knowledge of the number of words on a line. matrix_points must be defined as a 2d array of strings -- you have it declared as a 2d array of characters. You can't store an entire string in just one character.
const int ItemsPerRow = 8;
typedef std::vector<string> C;
int _tmain(int argc, _TCHAR* argv[])
{
std::vector<C> matrix_points;
C words;
std::ifstream input_file("C:/NDA/NissanNewApplication/Dev/CommonErrorManager/Src/ErrorMessageList.csv");
int c = 0;
std::string line;
while( getline(input_file,line) )
{
// now bust the line up into individual words
while(line != "")
{
int pos = line.find(' ');
if(pos > 0)
{
words.push_back(line.substr(0,pos));
line = line.substr(pos+1);
}
else
{
words.push_back(line);
line = "";
}
}
matrix_points.push_back(words);
words.erase(words.begin(),words.end());
}
return 0;
}