+ 1
What is wrong in below code? this code resulted in illegal memory access and the program is terminated by os.
tuple <string,string,string> t1; t1=make_tuple("a1","b1","c1"); string tag="a1",a,b,c; tie(a,b,c)=t1; if(a==tag){ return a; } //Above code is a member function //"tag" is the member variable of object
1 Respuesta
+ 1
got it,
access the member variable "tag" with "this->tag";
if(a==this->tag){
return a;
}