Following my previous question: this is what i came up with: perf_data is a vector.
void read_data() {
long val;
ifstream infile1("/foo/other");
infile1 >> val;
perf_data[1].first = val;
infile1.close();
ifstream infile2("/foo/core_0");
infile2 >> val;
perf_data[0].first = val;
infile2.close();
}
In python as I understand, this cannot be done for a file or can it be?