0
我收到以下錯誤,當我試圖解決我的文件:MYFILE未聲明的標識符
myFile undeclared identifier
幫助將不勝感激! :)我真的沒有看到這個代碼中有什麼問題。
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <string>
#include <windows.h>
int main()
{
ofstream myFile;
std::string name;
std::string password;
std::cout << "Enter Name" << std::endl;
std::cin >> name;
std::cout << "Enter password" << std::endl;
std::cin >> password;
std::string info = name + ":" + password;
myFile.open ("Database.txt");
myFile << (info) << std::endl << ;
myFile.close();
Sleep(10000);
}