refactor(test.cpp): 替换cstdio为iostream并简化测试逻辑

将测试文件中的cstdio替换为iostream,并移除不必要的指针操作。
简化测试逻辑,直接测试位移操作并输出结果。
This commit is contained in:
Zengtudor 2025-08-31 11:12:40 +08:00
parent 522e869e7b
commit 000e34da46
2 changed files with 6 additions and 8 deletions

0
src/8/31/P2704.cpp Normal file
View File

View File

@ -1,10 +1,8 @@
#include <cstdio>
#include <iostream>
using namespace std;
int main(){
int a=0;
char* c = (char*)&a;
c[0]=0x1f;
c[1]=0x1f;
c[2]=0x1f;
c[3]=0x1f;
printf("%d\n",a);
int a = 1;
a<<=32;
cout<<a<<"\n";
}