结构体变量的定义 使用案例

include <stdio.h>

include <stdlib.h>

/* control/header */
static struct uvcg_control_header_grp
{
//struct config_group group;
int length;
int bcdUVC;
}uvcg_control_header_grp;

int main()
{

uvcg_control_header_grp.length = 0;
uvcg_control_header_grp.bcdUVC = 0x301;

printf("uvcg_control is 0x%x
",uvcg_control_header_grp.length);
printf("uvc_control is bcdUVC is 0x%x
",uvcg_control_header_grp.bcdUVC);

while(1);

printf("Hello world!
");
return 0;

}

一勤天下无难事。
原文地址:https://www.cnblogs.com/nowroot/p/14233321.html