C ++将csv文件放入数组中(函数重载)

   if(!isEmpty()){
        std::ifstream file;
         file.open("input.csv");
        int i = 0;
        while(file.good()){
            string line1;
            getline(file, line1, '\n');
            cout << "what's in line1? " << line1 << endl;
            ps[i] = new A();
            ps[i]->setCsv(true);
            file >> *ps[i]; // function overloading like cin >> *ps[i];
            i++;
        }
        return true;
    }else{
        return false;
    }

这是函数重载部分

//A class header function overloading
std::istream& read(std::istream& is = std::cin);

//A class .cpp function definition
std::istream& Vehicle::read(std::istream& is) {
    int tint = 0;
    char tS[100];
    char * tM = new char[100];

    is >> tint;
    is.ignore();
    is.get(tS, 9,',');
    is.ignore(1000, ',');
    is.get(tM, 61, ',');
    is.ignore(1000, ',');
}

如果我输入cin >> * a,它将提示输入'A,123,BAS123,Great Apple,3'。

我从文件中得到A,123,BAS123,Great Apple,3行,并尝试放入类数组中。

请告知我下一步。

谢谢。