I want to calculate the standard derivation between two GPS Modules, so I can get an estimate on how accurate the one module is. I have logged it into a normal text file and it is now filled with lots of unnecessary Data. The calculating Part is no Problem but I please need help with the Code two filter out the parts i need and the parts i don't need, for example:
Read your file line by line. To get the data from a line you can use a stringstream and getline.
A line has 7 tokens seperated by ','
Skip the first two, read the 4 you need and skip the rest.
Ok this is was a great help already, last problem I need to read the lines from a source.txt File and write them into another new.txt, thats really my last request!
Where are you even reading anything from your file?
Why did you open the stream for both read and write? I thought you wanted one file for reading and another file for writing. If this is the case I suggest you use an ifstream for the input stream, and an ofstream for the output stream. It also looks like you need to review some documentation for basic file input and output: