标题:谁帮我看下哪出问题啦
取消只看楼主
灰度光阴
Rank: 1
等 级:新手上路
帖 子:7
专家分:7
注 册:2012-10-6
结帖率:100%
已结贴  问题点数:20 回复次数:1 
谁帮我看下哪出问题啦
#include<stdio.h>
int main(void)
{
    char title[]="longMai C language pointer";
    char*p_title;
    printf("title: %s\n.title");
    p_title=title;
    printf("p_title->title:%s\n".p_title);
    printf("&title=%p\n".&title);
    printf("p_title=%p\n".P_title);
    printf("&title[0]=%p\n".&title[0]);
    return 0;

}--------------------Configuration: Cpp1 - Win32 Debug--------------------
Compiling...
Cpp1.cpp
D:\c语言\指针\1\Cpp1.cpp(8) : error C2228: left of '.p_title' must have class/struct/union type
D:\c语言\指针\1\Cpp1.cpp(9) : error C2059: syntax error : '&'
D:\c语言\指针\1\Cpp1.cpp(10) : error C2228: left of '.printf' must have class/struct/union type
D:\c语言\指针\1\Cpp1.cpp(10) : error C2228: left of '.P_title' must have class/struct/union type
D:\c语言\指针\1\Cpp1.cpp(11) : error C2059: syntax error : '&'
执行 cl.exe 时出错.

Cpp1.obj - 1 error(s), 0 warning(s)
搜索更多相关主题的帖子: return include c语言 pointer 
2012-10-18 22:26
灰度光阴
Rank: 1
等 级:新手上路
帖 子:7
专家分:7
注 册:2012-10-6
得分:0 
回复 3楼 liman123
新手就是一直犯错
2012-10-22 18:27



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




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

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