![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
ephramliu
NWPU硕士
展开
-
c++ 读取写入txt
1 写入 ofstream out("../write.txt"); out << "["; for (int i=0; i<10; i++){ out << i; if (i != 9){ out << ","; } } out << "]"; out.close();写入的文件2 读取读取刚刚写入的txt文件ifstream in;in.open("../write.txt")原创 2021-05-16 00:32:12 · 1581 阅读 · 0 评论 -
c++ time.h 用法
1 时间戳#include <time.h>time_t first, second;first=time(NULL); // 当前时间时间戳Sleep(2000);second=time(NULL); // 当前时间时间戳原创 2021-05-15 19:17:11 · 1121 阅读 · 0 评论 -
c++ vector api summary
1 判断vector是否为空if(v.empty())if(v.size() == 0)原创 2021-05-14 14:08:42 · 128 阅读 · 0 评论