我的 IDE 最后一行的“文件名”变量存在问题。有人可以指出我为什么吗?
switch(filename_selection)
{
case 1: filename_selection = 1;
filename = "foo3.sql";
break;
case 2: filename_selection = 2;
filename = "foo2.sql";
break;
case 3: filename_selection = 3;
filename = "foo1.sql";
break;
default:
cout << "Invalid selection." << endl;
break;
}
ofstream File;
File.open(filename, ios::out | ios::trunc);