mirror of
https://gitcode.com/Zengtudor/alg2025.git
synced 2025-08-31 23:41:41 +00:00
refactor(test.cpp): 替换cstdio为iostream并简化测试逻辑
将测试文件中的cstdio替换为iostream,并移除不必要的指针操作。 简化测试逻辑,直接测试位移操作并输出结果。
This commit is contained in:
parent
522e869e7b
commit
000e34da46
0
src/8/31/P2704.cpp
Normal file
0
src/8/31/P2704.cpp
Normal file
14
src/test.cpp
14
src/test.cpp
@ -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";
|
||||
}
|
Loading…
Reference in New Issue
Block a user