我有以下代碼:請求會員在一些不是結構或聯盟的東西?
people[nextfreeplace] -> personName = name;
people[nextfreeplace] -> age = age;
typedef struct person
{
char *personName;
int age;
}Person;
的人聲明Person *people[]
我收到了一條error: request for member 'personName' in something not a structure or union
error: request for member 'age' in something not a structure or union
,但我不知道什麼是錯的程序。
感謝
如何'people'聲明? – Roddy
@Roddy人*人[] – AkshaiShah
你能張貼*最小*,完整的,可編譯例子嗎?你所說的沒有加起來。這種精細編譯:http://ideone.com/GgWtaB – Roddy