If the path contains spaces then cin >> path will not work because >> stops at the first space. To use spaces call getline(cin, path)
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
Apparently the file isn't where your program thinks it is. Type the complete path to the file and it should open ok.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343