HI,
I have following terrific confusion.
class test
{
public:
int i;
int * j;
int **k;
};
int main()
{
//following is the correct syntax.
int test ::* iptr = & test ::i;
int* test::*iptrptr = & test :: j;
int** test :: * iptrptrptr = & test :: k;
//Ok.But I am tempted to use following syntax.
//int* test :: iptr = & test ::i;
//int** test::iptrptr = & test :: j;
//int*** test :: iptrptrptr = & test :: k;
return 1;
}
so can any one tell me why the following syntax is incorrect
int* test :: iptr = & test ::i;
int** test::iptrptr = & test :: j;
int*** test :: iptrptrptr = & test :: k;
Well, I can use the correct syntax with comfort but somehow I am unable
to convince myself why the incorrect syntax is incorrect.
(The confusion will be over once someone tells me the logical thinking
reason behind this and not the kind of answer that compilers interpret
in that way!!:))
Thanks and Regards,
Yogesh Joshi