ofxCsv icon indicating copy to clipboard operation
ofxCsv copied to clipboard

Error loading first value of first row

Open jaysonh opened this issue 5 years ago • 0 comments

I always seem to get 0 when I load the first value of the first row. For example for the following csv file:

20,3,2 2,34,12 293,12,1 39,10,10 using this code: ` ofxCsv thisCsv; ofSetLogLevel(OF_LOG_VERBOSE);

if (thisCsv.load("test.csv"))
{
	ofLog(OF_LOG_VERBOSE) << "there should not be an 0's below";
	for (int i = 0; i < thisCsv.size(); i++)
	{
		ofxCsvRow thisRow = thisCsv.getRow(i);
		
		int val1 = thisRow.getInt(0);
		int val2 = thisRow.getInt(1);
		int val3 = thisRow.getInt(2);

		ofLog(OF_LOG_VERBOSE) << val1 << "," << val2 << "," << val3;
	}
}`

I always get 0 for val1? This is of9.8 windows, 0.20 of the addon

jaysonh avatar Oct 22 '18 14:10 jaysonh