结构指针

Posted bingws

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了结构指针相关的知识,希望对你有一定的参考价值。

和数组不同,结构变量的名字并不是结构变量的地址,必须使?&运算符

#include<stdio.h>

struct date {
    int  month;
    int  day;
    int  year;
};

int main(int argc, char const  *argv[])
{
    struct date today;
    today = (struct date){07, 31, 2014}
    struct date *pDate = &today;
......
}

  



以上是关于结构指针的主要内容,如果未能解决你的问题,请参考以下文章