명품 C++ programming 12장 실습문제 3번


명품 C++ programming 12장 실습문제 3번

문제 영문 텍스트 파일을 읽고 영문 글자를 모두 대문자로 출력하라. c:\windows\system.ini로 테스트 하라 내가 짠 코드 #include<iostream>#include<fstream>#include<string>#include<cctype>using namespace std;int main() { ifstream fin("c:\\windows\\system.ini"); if (!fin) { cout << "c:\\windows\\system.ini 열기 실패!" << endl; } string line; while (getline(fin, line)) { for (int i = 0; i < line.length(); i++) { cout << (char)toupper(line[i]); } cout << endl; } fin.close();}...



원문링크 : 명품 C++ programming 12장 실습문제 3번