I have the task of reading an M x N matrix of numbers from a CSV file in C++. I have an idea of how to do this using std::vector
(using a vector of vectors is my initial plan); however, I'm having trouble thinking of a way to read in the arbitrary number of columns. Is there an easy way to do this?
My initial plan is to read it line by line and manually find the commas separating the numbers, but again, there could be an arbitrary amount of them.