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);
}