its been a fair while since I did c and c++ at university. What I'd like to know is what functions and headers are best for reading text from a file. I'm looking to read engineering data such as floats , doubles etc written as text in the file in various formats I.e some lines may have 4 floats and others may be more or a mix of text and floats. Is there a faster way than using sscanf and reading a line by fgets?
Searching from internet there are quite a lot of solution on this.
Using C++ iostream, read floats from text can be very simple. For example, see answer from:
Hope this helps.