Question: Problem deals with C++. How do you close an istream pointer or just delete the pointer (near the top of read function). I'm having file3
Problem deals with C++.
How do you close an istream pointer or just delete the pointer (near the top of read function).
I'm having file3 overwritten with file3, file2, and file1 contents. file2 is overwritten with file2 and file1 contents. Hence, I'm assuming its something to do with my istream pointer. Here is the compile arguments $ ./hw 90 file1 file2 file3

This is so you can visualize what I'm trying to accomplish

This happens. It's adding the previous file(s) content to the forward file. Its suppose to read from the file, rotate its content by 90 degrees and then write back to that file.
I added "delete in" hoping that would fix it but it came up with all sorts of errors mostly with malloc: *** error for object pointer freed was not allocated and such.
* reads data from text file and pushes it to vector * @param empty 2D vector * @param filename (argv[i] from for-loop) void read (vector
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
