i have a data like this;
InvoiceNo;StockCode;Description;Quantity;InvoiceDate;UnitPrice;CustomerID;Country
A;B;C;D;E;F;G;H
A2;B2;C2;D2;E2;F2;G2;H2
.
.
.
A500000;B500000;C500000;D500000;E500000;F500000;G500000;H500000
I am using that code to read file;
std::ifstream is("myData.csv", std::ifstream::binary);
if (is) {
is.seekg(0, is.end);
int length = is.tellg();
is.seekg(0, is.beg);
char* buffer = new char[length];
std::cout << "Reading " << length << " characters... ";
is.read(buffer, length);
if (is) {
std::cout << "all characters read successfully.";
}
else
std::cout << "error: only " << is.gcount() << " could be read";
is.close();
delete[] buffer;
}
My question is, how can i store that datas in a linked list? I create a node to store StockCode, Description and Quantity. How can i get the that columns data from buffer?
I can use only iostream, ctime,fstream, string libraries to solve that problems. No vector.