C31.cpp(14) : error C2065: 'P' : undeclared identifier
#include"stdio.h"#include"stdlib.h"
struct data
{
int x,y;
};
void main()
{
struct data *p;
p=(struct data *)malloc(sizeof(struct data));
(*p).x=3;
(*p).y=4;
printf("%d %d\n",p->x,P->y);
free(p);
}
C:\Users\Administrator\Desktop\Debug\testC\C31.cpp(14) : error C2065: 'P' : undeclared identifier
C:\Users\Administrator\Desktop\Debug\testC\C31.cpp(14) : error C2227: left of '->y' must point to class/struct/union