i am confused concerning out of an program consider we have a class like below:
#ifndef SOMECLASS
#define SOMECLASS
class SomeClass
{
public:
SomeClass();
SomeClass(int);
~SomeClass();
void foo(const int&);
}
#endif
and its implementation....
so in main function:
int main(int argc, char **argv){
SomeClass* smc=new SomeClass();
cout<<smc<<"--"<<&smc<<"--"<<&*smc;
}
and my output a thing like below:
0xf66210----0x7ffd622a34f0----0xf66210
why does it difference among smc and &smc and &*smc? note that smc and &*smc are equal.
i am using ubuntu(14.04_x64) and+cmake(2.18)+gcc(4.8.4)