0
How do i sort my data file in c++? I can't sort it in while(!name.eof()).
File Handling, Sorting
5 Respuestas
+ 4
This is also possible:
while (source.getline (buf, 256)) { ... }
+ 3
while (source.get (ch)) { ... }
while (source >> ch) { ... }
while (!source.eof()) { ... }
+ 2
Please see here:
https://www.sololearn.com/learn/774/
+ 1
Thank you for the idea. I have an idea about sorting, but i need to sort inside the .txt file.
+ 1
https://code.sololearn.com/cc5Zb857OQ58/?ref=app
Sorry for late reply 😅. This is my code. I want to get first the 'percentage' on .dat file for sorting. But the percentage is 0 only.
I changed my .txt file into .dat file.