这个奇怪的程序为什么把win10弄死机了?
  • 板块灌水区
  • 楼主一Ⓐ一
  • 当前回复11
  • 已保存回复11
  • 发布时间2022/2/1 23:11
  • 上次更新2023/10/28 09:50:22
查看原帖
这个奇怪的程序为什么把win10弄死机了?
213250
一Ⓐ一楼主2022/2/1 23:11
#include<bits/stdc++.h>
using namespace std;
struct a{
    long long a[10000];
};
int main(){
    //cout<<sizeof(a)<<endl;    80000 per `a'
    a *p=new a;
    a *maxn=NULL;
    while(p!=NULL
    #if __cplusplus>=201103L
    &&p!=nullptr
    #endif
    ){
        maxn=max(maxn,p);
        p=new a;
    }
    cout<<"The farthest address is:\n\t"<<maxn<<endl;
    return 0;
/*
 * DON'T RUN! DON'T RUN!! DON'T RUN!!!
 * If you ran,you would probably regret...
 * Just like me...
 * I nearly KILLED my win10(ASUS)!!!
 */  
}

我强制关机,才没有炸……

2022/2/1 23:11
加载中...