I have a huge file but I only want to read the last line and store the different fields in that last line in some variables. Is there any efficient way to do this? Thanks.
I have a huge file but I only want to read the last line and store the different fields in that last line in some variables. Is there any efficient way to do this? Thanks.
while(fgets(buff, 200, fp));
Just uses the same buffer for each call....
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
Thanks. That worked.