String concatenated with int

At aroung 32 mins in the video an example is taken in which c1[“real”] is given in which [] is overloaded
void operator[ ] (String s)
{ cout<<real<<" +" <<img<< s<<endl;
}
this is the code written for overloading but how can we concatenate real which is int with string s?

Hey @kunal81198
We aren’t concatenating anything,just printing in that order here :cout<<real<<" +" <<img<< s<<endl;