Is there any way in C++ to identify a file stream? It doesn’t really matter what it is, as long as two streams created from the same file have the same “id”; anything that would allow me to say that two streams created from the same file are equivalent (not equal).
Share
As far as I can tell, there’s no built-in way to compare two file streams. You would either have to compare the two pointers, which would require you to keep track of streams which are the same (which might not be possible in your case, judging from the format of the question), or read the data in both file streams and compare it instead.