美文网首页
c++ read file

c++ read file

作者: wasdzy111 | 来源:发表于2021-07-30 15:42 被阅读0次

    include <iostream>

    include <fstream>

    include <string>

    using namespace std;

    int main() {
    char url[] = "文件路径";
    ifstream fin;
    fin.open(url);
    int count = 0;
    string stUin;
    while (getline(fin, stUin)) {
    count++;
    printf("%s\n", stUin.c_str());
    }
    return 0;
    }

    相关文章

      网友评论

          本文标题:c++ read file

          本文链接:https://www.haomeiwen.com/subject/rtccvltx.html