This code gives me errors when compiled using visual studio 2012, but with codeblocks it is okay
问题 #include <iostream> #include <string> #include <fstream> #include <sstream> #include <vector> #include <iterator> #define ADDR "c:\\Users\\Library2\\Desktop\\Books record\\" using namespace std; int main() { ifstream fin(ADDR "reportcard.csv", ios::binary); string line; int rowCount=0; int rowIdx=0; while(getline(fin,line)){ rowCount++; } vector<string> data[**rowCount**];//this rowCount gave me "expression must have a constant value" fin.clear(); fin.seekg(fin.beg); while(getline(fin,line))