#include<bits/stdc++.h>
#include<windows.h>
#define int long long
using namespace std;
typedef long long ll;
const int N=105;
const int NN=3005;
const int NNN=200005;
const int MOD = 1e9;
time_t x;
int setCMDWindowSize(int width, int height){
SMALL_RECT rect;
rect.Top = 0;
rect.Left = 0;
rect.Bottom = height - 1;
rect.Right = width - 1;
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
if (handle == INVALID_HANDLE_VALUE) {
return 1;
}
if (!SetConsoleWindowInfo(handle, true, &rect)) {
return 1;
}
COORD dims = { width, height };
if (!SetConsoleScreenBufferSize(handle, dims)) {
return 1;
}
return 0;
}
signed main(){
while(1){
setCMDWindowSize(25, 2);
time(&x);
cout << asctime(localtime(&x));
Sleep(1000);
system("cls");
}
return 0;
}
/*
*/剪贴板
剪贴板 bci8wa1a
剪贴板信息
剪贴板信息
- 收录
- 更新