Friday, December 4, 2009

Indirection / Multiplication / Commenting

#include

int main()
{
    int x=3, y=1;
    int *p = &z;
    y = x/*p; 

  //  This will be treated as comment starting at /*
}




To avoid this we can use space betweel / and * .

y = x/   *p;  or   y = x/(*p)

No comments:

Post a Comment