My input file has the following information
10 20 30
100 200 300
1000 2000 3000
The first row represents the word city. ie. city can have possible values of 10, 20 and 30. The second row represents temperature, which can have possible values of 100, 200 and 300. The third row represents recommended which has possible values of 1000, 2000 and 3000. I want to create multiple files with each file containing one combination of the 3 values. ie.
city 10
temperature 100
recommended? 1000
is one file
city 10
temperature 100
recommended? 2000
is another file and so on. So there will be a total of 27 files, containing all possible combinations of city, temperature and recommended. When I run the code I am able to get 27 files with just one combination.
At line 76 you have fout.close();
The file open should also be in that same block of code, within that innermost loop, immediately before the fout << statements.