C++获取时间最简便方法

    科技2022-07-20  96

    如果只是要输出,用system(“time”);就行了。 而获取日期则用system(“date”);。 例子(输出当前时间及日期):

    #include<bits/stdc++.h> using namespace std; int main() { system("time"); system("date"); return 0; }
    Processed: 0.010, SQL: 8