728x90 fsteam1 [C++] 06 - 파일 입출력 활용 include된 라이브러리 #include //cin, cout #include //ofstream, ifstream, fstream #include //setw using namespace std; 파일 입출력, fin, fout int main() { char ch; ofstream fout; fout.open("char.txt"); //project8.exe while (true) { cin >> ch; if (ch == 'q') break; fout.put(ch); } fout.close(); ifstream fin; fin.open("char.txt");//파일 이름은 대소문자 구분x if (!fin) { cout = 60) grade = 'D'; else grade = 'F'; } void w.. 2021. 8. 5. 이전 1 다음 728x90