I love how in python I can do something like:
points = []
for line in open(\"data.txt\"):
a,b,c = map(float, line.split(\',\'))
points += [(a,b,c)]
<
Its nowhere near as terse, and of course I didn't compile this.
float atof_s( std::string & s ) { return atoi( s.c_str() ); }
{
ifstream f("data.txt")
string str;
vector> data;
while( getline( f, str ) ) {
vector v;
boost::algorithm::split_iterator e;
std::transform(
boost::algorithm::make_split_iterator( str, token_finder( is_any_of( "," ) ) ),
e, v.begin(), atof_s );
v.resize(3); // only grab the first 3
data.push_back(v);
}