Question: c++ program, how to write integer(that read from file1) into a new file(file2) with completed sorted linked list (ascending order) the program below is read

c++ program, how to write integer(that read from file1) into a new file(file2) with completed sorted linked list (ascending order)

the program below is read integer from file1

#include

#include

int main(int argc, char * argv[])

{ std::fstream myfile("D:\\file1.txt", std::ios_base::in);

int a;

while (myfile >> a)

{printf("%f ", a); }

getchar();

return 0;

}

file1.txt:

91 322 9 10 77 8 999 12 133 14 8 538 29 91 88 702 361 637 99

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!