标题:C31.cpp(14) : error C2065: 'P' : undeclared identifier
取消只看楼主
whphp
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2016-6-20
结帖率:100%
已结贴  问题点数:20 回复次数:3 
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
搜索更多相关主题的帖子: Desktop include Users 
2016-06-20 22:38
whphp
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2016-6-20
得分:0 
回复 3楼 tremere
感谢 谢谢
2016-06-21 21:33
whphp
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2016-6-20
得分:0 
回复 楼主 whphp
谢谢
2016-06-21 21:34
whphp
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2016-6-20
得分:0 
回复 2楼 Croson
谢谢
2016-06-21 21:35



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-466176-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.724993 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved