#include <iostream>
#include <fstream>
using namespace std;
int main(){
    fstream filename;
    int num = 0;
    char c;
    filename.open("test.txt", ios::in);
    while (!filename.eof()) {
        filename >> c;
        num++;
    }
    filename.close();
    cout << num << endl;

    return 0;
}

posted on 2023-12-14 15:11  wshidaboss  阅读(22)  评论(0编辑  收藏  举报