include <iostream>
#include <fstream>
#include <iomanip>
#include <string>
using namespace std;
int main()
{
ifstream inFile;
ofstream outFile;
string filename;
string crypt;
int move;
cin >> filename;
cin >> crypt;
cin >> move;
inFile.open(filename); // 여기서 에러가 납니다 .. 파일이름을 cin으로 읽어와서 입력된 파일을 열고싶은데 안되네요 ㅠㅠ 꼭 스트링을 직접입력해야 하나요? 도와주세요..
if (!inFile)
{
cout << "FILE NOT FOUND :" << filename <<endl;
}
if ((crypt != "d" ) && (crypt != "c" ))
{
cout << "Only c or d accepted." << endl;
}
if (move != 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,7,18,19,20,21,22,23)
{
move = 3;
}
inFile.close();
outFile.close();
return 0;
}
|