Hi, Can anyone explain me why this code causes run time error:
SimpleCat *pRags=new SimpleCat;
pRags=&Frisky; //if I put this then run-time error
cout<<"Frisky is "<<pRags->itsAge<<"age"<<endl;
delete pRags;
I have class SimpleCat, and if class is some like new data type why I can't use analogy
int x=2;
int *p=new int;
p=&x
??????