МУ
Максим Ульянов
#include
#include
#include
using namespace std;
void ru();
int main() {
ru();
wcout << L"Введите имя файла: ";
const size_t max_file_name = 123;
const size_t max_file_length = 128;
wchar_t filename[max_file_name];
wcin.getline(filename, max_file_name);
wcscat_s(filename, max_file_length, L".txt");
ofstream ofs;
ofs.open(filename, ifstream::out);
if (ofs.is_open()) ofs.close();
wcout << L"Прверьте наличие файла " << filename << L" в папке проекта\n";
cin.get(); cin.get();
return 0;
}
void ru() {
wcout.imbue(locale(".866"));
wcin.imbue(locale(".866"));
}
Вводите имя и открываете файл с этим именем.