Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Access of pointer to double member in a class

$
0
0

I kept getting error 'x' was not declared in this scope.

Thanks in advance.

class cl {

public:  double *x;

}

int main() {

cl c1;

void fctn (cl *) ;

fctn (&c1);

return 0;

}

void fctn(&c1) {

c1->x = 5;

}

Viewing all articles
Browse latest Browse all 15302

Trending Articles