Hey.
So i have a task to take input data from file.in and put something in output file which is .out. the thing is, it creates the .out file, but it wont make the .in file. Instead it makes .o file. Any idea what am i doing wrong?
1 2
fstream fin ("fileIn.in", ios::in);
fstream fout ("FileOut.out", ios::out);
This piece of code will not create "fileIn.in". It will try to open the file for reading but if the file doesn't exist it will fail. You will have to create this file somehow before you can read from it.