V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
0littleboy
V2EX  ›  C++

分享 C++ 开发中遇到的问题

  •  
  •   0littleboy · 2023-03-07 14:42:54 +08:00 · 1325 次点击
    这是一个创建于 408 天前的主题,其中的信息可能已经有所发展或是发生改变。

    今天清理硬盘的时候,突然发现了一个大文件

    hsA9x.png

    hs2k5.png

    打开代码一看被曾经的自己吓到了,while 一直循环

    #include <vector>
    #include <cstdio>
    #include <iostream>
    
    using namespace std;
    
    using pii = pair<int, int>;
    
    void solve() {
        vector<pii> lectures;
        int a, b;
        while (scanf("(%d,%d)", &a, &b) != -1) {
            cout << a << " " << b << endl;
            lectures.emplace_back(a, b);
        }
    }
    
    int main() {
        freopen("in.txt", "r", stdin);
        freopen("out.txt", "w", stdout);
        solve();
        return 0;
    }
    

    hs3OC.png

    占用了 7 个 G 直到今天空间不够才发现

    1 条回复    2023-05-23 17:31:44 +08:00
    Tumb1eweed
        1
    Tumb1eweed  
       331 天前
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1438 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 17:20 · PVG 01:20 · LAX 10:20 · JFK 13:20
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.