I use following syntax to create a file but file can't be created
When InOutFile is false??I can't create a file because InOutFile is always false...?Why?Please help me , thanks very much....Code:path1 = "D:\\Example\InputFile.txt";
fstream InOutFile(path1,ios::in|ios::out);
if (!InOutFile){
cerr<<"File can't be created!"<<endl;
exit(1);
}
I declared suitable librarys....And compiling doesn't have any errors