joshhooker
2/22/2017 - 10:40 PM

C++ Read File Line by Line

C++ Read File Line by Line

#include <cassert>
#include <fstream>

std::ifstream in(fileName);
assert(in.is_open());

double var1, var2;

while(in >> var1 >> var2) {
    do stuff;
}