这个是什么意思,unsigned int c:2, d:1;
struct s1 {
char ch, *ptr;
union {
short a, b;
unsigned int c:2, d:1;
}
struct s1 *next;
};
主要看不懂符号 :
请达人指点一二
http://blog.cechina.cn/true_toyou/153702/message.aspx
请楼主自行google“位域”
恩
这应该指定变量c,d,的取值范围:0 <=c <=3; 0 <=d <=1; 假如你给c赋值>3,执行的时候会出错!
嘻嘻,我没测试的,你试验一下!
如果没记错的话,c:2,指c只有两个字节有效;
相关问答:
在查询后将查询出来的值赋给各输入框
<c:if test="${not empty dataValue}">
fm.SAMPLING_DATE.value=" <c:out value='${dataValue.SAMPLING_DATE}'/ ......
C/C++ code:
#include <stdio.h>
typedef struct node{
int *key;
int length;
}node;
void insert(node &temp,int n)
{
int i,j;
for(i=0;i<=temp.length;i++)
{
......
fastshow()
{
FILE *fp;
char name[10];
char ch[512];
printf("请输入待显示的文件名\n");
scanf("%s",name);
if((fp=fopen(name,"r"))==NULL)
{
printf ......
下面这个程序是让算出 密码 , 第一个出来是passworD,第二个是xyz+ 任何一个字符
后面的3个我就看不明白了,大侠们帮我看看, 从 87 行 - 110行, 是3个密码,谢谢
1 #include ......
一个数如果好等于它的因子之和,这个数就成为"完数",例如6的因子为1,2,3而6=1+2+3,而6=1+2+3,因此6是“完数".编程序找出1000之内的所有完数,并按下面格式输出其因子:6 its factors are 1,2,3
......