On your second point - I know what you mean, but if you search the folder for text files, *.txt, you can compare a list of them with what you entered. That way it won't 'hang', as you say it does. I don't think it should hang though.
Oh, and you're right, I did close it three times. I should have only done it twice, and gotten rid of the close() in the if() statement, or the one at the very end.
If I compile and run this:
Code:
int main( void )
{
Matrix thing;
string Info = "";
bool OpenOK = GetFileInfo( "thing.txt", Info );
cout<< OpenOK;
return 0;
}
and the file thing.txt exists, it works fine, and OpenOK = 1. However, if I change it to thing.txtt, or if I delete the file thing.txt, OpenOK is 0. It works fine for me.