软件被系统警告,求高手指点!!!!
今天我本想做一款恶搞软件,软件成功生成,但运行时却被系统警告,并且编译器显示程序触发断点。这是代码:
#include <iostream>
using namespace std;
class w{
int we;
public:
int address(){
we=1;int *q;
while(we<=10){cout<<q<<endl;q++;we++;}return 0;}};
int main(){
cout<<"1 world address of all"<<endl<<"2 address of fight"<<endl<<"3 address of all human"<<endl<<"4 exit"<<endl;
int i=1;while(i>=0){
int a;cin>>a;
if(a==1) {w b;b.address();}
if(a==2) {w b;b.address();}
if(a==3) {w b;b.address();}
if(a==4) break;}
return 0;}
求助!!!!