Home > Back-end >  Question on the TXT file output, I want to input data in figure after the location of the output sho
Question on the TXT file output, I want to input data in figure after the location of the output sho

Time:11-06

#include
#include
#include
#include
using namespace std;
Int main () {
Int m;
cout <"Please enter the number of students:" & lt; <"";
cin> m;
Ofstream ofile (" grade. TXT ");
Ofile<"Grade" & lt; cout <"Please enter the age, the marking:" & lt; For (int I=0; I & lt; m; I++) {
Int x=0, y=0;
cin> X & gt;> y;
int j=0;
Ofile & lt; While (j & lt; Y) {
Ofile & lt; <"*";
j++;
}
Ofile}
Here////////////
Ofile. Close ();
cout <"At the end of the output" & lt; return 0;
}

CodePudding user response:

In front of the program is not have output? According to write

CodePudding user response:

reference 1st floor SuperDay response:
in front of the program is not have output? According to written ok

No, I was in the content, which are output TXT text I will enter * in addition to the input data

CodePudding user response:

Write TXT then read it out? That should after the close

CodePudding user response:

The
reference 3 floor SuperDay response:
write TXT then read it out? That should after close

So what should I do? Thank you for the great god grant instruction

CodePudding user response:

It is good to look for example a change on the book

CodePudding user response:

reference 5 floor SuperDay reply:
for example the book had a change on

,,,,,,,,,,,,,,,

CodePudding user response:

To do this, don't always think about to take shortcuts get ready

CodePudding user response:

refer to 7th floor SuperDay response:
is such, don't always think about to take shortcuts with ready-made

In education, a great god said right,
  • Related