0

I'm looking for a function that accepts the name of a txt file and a column number and returns the data of that column.

std::vector<double> getColumn<std::string& file, const int& NumColumn>

The format of the file is as follows

12.333  10.4  3.4
12.333  10.4  3.4
12.333  10.4  3.4
12.333  10.4  3.4

Note: I can implement this function but my question if there is a built-in function in boost or STL since this feature is beneficial. Matlab has a function to handle tabulated data called load

CroCo
  • 5,531
  • 9
  • 56
  • 88
  • boost::spirit::qi is boost's parser. Very powerful, definitely overkill. I can hold your hand and walk through it if you want. http://www.boost.org/doc/libs/1_59_0/libs/spirit/doc/html/index.html – Russell Greene Dec 01 '15 at 06:01
  • @RussellGreene that's a good option. Linked to a dupe that includes comparisons too – sehe Dec 01 '15 at 07:48

0 Answers0