字符串转换为整型:
unsigned char devnum_param[10]=“12”;
int num
sscanf(devnum_param,"%d",&num);
整型转换为字符串:
sprintf(字符串的名字,"%d",整型变量的名字);
IP地址字符串分离出4字节整型
sscanf(IP,"%x.%x.%x.%x",&a,&b,&c,&d);
字符串转换为整型:
unsigned char devnum_param[10]=“12”;
int num
sscanf(devnum_param,"%d",&num);
整型转换为字符串:
sprintf(字符串的名字,"%d",整型变量的名字);
IP地址字符串分离出4字节整型
sscanf(IP,"%x.%x.%x.%x",&a,&b,&c,&d);