Once the failbit gets set on a stream, you need to clear it before
you can do anything else with the stream.

So, in your section, if the file can not be opened, the failbit gets set.
All attempts to open a file using that stream will fail.

Use the clear() member function to clear the flags for the stream.

Code:
cin >> fileget;
receive.clear(); 
receive.open(fileget);
I did not look at the rest of your code, but it is probably the same
problem.