#includeusing namespace std;struct Object{
int a;
int b;};void main(){
Object& MyFunction(int b,int a=20);
Object& rMyObj = MyFunction(5);
cout<<"rMyObj.a="<
delete &rMyObj;}Object& MyFunction(int b,int a){
Object *o = new Object;
o->a = a;
o->b = b;
return *o;}最后一句為啥return *o,而不是return o;或者return &o?
c++一句代碼不明白,求教。
慕桂英4014372
2018-12-16 18:18:40