dereferencing a pointer that is a member of a class instance
hello and sorry if this is a frequently asked question but is this how to access a value of a variable pointed to by a pointer that is a member of a class instance?
char bam = 'x';
boo.bar = &bam;
cout<< *(boo.bar); //is <- how to access what's at bam through boo.bar?
thanks in advance.
*boo.bar both works equally well.
Topic archived. No new replies allowed.