I want to read from criteria.txt
file, to tokenize and append at the end of the same file the tokens. The program throws an exception: No file found!
In my opinion you can't do that. You can't open the same file to read and write at the same time. You have to open and save the file information in a data structure and then close it. Then you have to work with the data structure in memory and open the file to write results. And when you finish to write you should close it.