结构体返回值
#ifndef _debug_#define _debug_
#include "stdio.h"
typedef unsigned char uint8_t;
struct comple
{
uint8_t mjy;
uint8_t dzm;
uint8_t vale:3;
};
struct comple name;
struct comple new_struct(uint8_t a,uint8_t b);
#endif
#include "_GENERAL_.h"
struct comple new_struct(uint8_t a,uint8_t b)
{
struct name;
name.dzm=a;
name.mjy=b;
printf("%d\n",a);
printf("%d\n",b);
return name;
};
printf("%d\n", new_struct(1,2));
uint8_t vale:3; 这个成员怎样赋值
VC6运行返回这个值 为什么是258
[ 本帖最后由 duzhiming 于 2013-3-20 23:59 编辑 ]