【发布时间】:2015-02-21 01:54:35
【问题描述】:
typedef struct abc{
int a;
char b;
}abc;
typedef abc bkl[1];
.
.
.
blk b;
b=shmat(shmid, NULL, 0); //This error that (Void *) to blk
//But anyway blk is pointer,it isnt ?
blk *b;
b=shmat(shmid, NULL, 0); //This is correct, why? b pointor to pointer
谢谢。
【问题讨论】:
-
不要 typedef 数组类型。你得到的只是这种问题。而且我什至不会 typedef 指针指向任何东西。把变量声明中的
*全部写下来,会容易很多。
标签: c types struct void-pointers