CodePudding user response:
Such as desktop document hehe (wanted to preach photos, but too slow to load)CodePudding user response:
The document is called ha haCodePudding user response:
Using a library "fstream to solve"Ifstream is to file read
Ofstream for file is written to the flow of
Fstream flow for file read and write
CodePudding user response:
Can you write a complete codeCodePudding user response:
I don't know you is to realize the file input and output?Suppose you put the files and programs on the same path (i.e., the same folder), you can like this:
Freopen (" STH. In ", "r", stdin);
Freopen (" STH. Out ", "w", stdout);
Then you read data from STH. In this file read (you can modify the name of your file name), the output data in STH. Out (also can be modified),
This can be achieved is the file input and output,
Pictures I won't, please trust,
CodePudding user response:
Thank you, could you tell me how to open the photoCodePudding user response:
#include#include
using namespace std;
Int main ()
{
Freopen (" h.t xt ", "r", stdin);
Freopen (" h.t xt ", "w", stdout);
return 0;
}
Would you please tell me why the code has a problem,,,
CodePudding user response: