Need to invert the output!
ok i output this string to a .txt file using ifstream...
now suppose i was printing city names as output...if it comes in the order Adelaide, Canberra, Melbourne, Sydney during the print to the file, I want it to print in the other direction...
ofstream fout; //to write out to an output file
fout << something;
fout << flush;
my output should be: Sydney, Melbourne, Canberra, Adelaide...
I guess there's some string copy and then invert operation but i thought you could something like this directly while printing...