struct结构定义变量的形式

struct addrinfo {
    int ai_flags;
    int ai_family;
    int ai_socktype;
    int ai_protocol;
    socklen_t ai_addrlen;
    struct sockaddr *ai_addr;
    char *ai_canonname;
    struct addrinfo *ai_next;  //结构定义变量的形式.
}

 

type = struct addrinfo {    int ai_flags;    int ai_family;    int ai_socktype;    int ai_protocol;    socklen_t ai_addrlen;    struct sockaddr *ai_addr;    char *ai_canonname;    struct addrinfo *ai_next;}

posted @ 2020-04-26 11:23  心媛意码  阅读(288)  评论(0编辑  收藏  举报