[C++]명품 C++ 프로그래밍 실습문제 12장 14번
[C++]명품 C++ programming 실습문제 12장 14번
명품 C++ 프로그래밍실습문제/연습문제 /C++
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <cstring>
#include <iomanip>
#include <cctype>
using namespace std;
int main(){
int count=0;
ifstream file;
file.open("/home/myunggi/.nanorc",ios::in|ios::binary);
//파일경로는 책에 있는대로 하면 됩니다.
char c[1];
while (file.read(c,1))
{
count++;
}
cout << count;
return 0;
}
'C++' 카테고리의 다른 글
[C++]명품 C++ 프로그래밍 실습문제 13장 3번 (0) | 2023.01.29 |
---|---|
[C++]명품 C++ 프로그래밍 실습문제 13장 2번 (0) | 2023.01.28 |
[C++]명품 C++ 프로그래밍 실습문제 12장 13번 (0) | 2023.01.27 |
[C++]명품 C++ 프로그래밍 실습문제 12장 11번 (0) | 2023.01.27 |
[C++]명품 C++ 프로그래밍 실습문제 12장 9번 (0) | 2023.01.27 |