c代码纠错 急急!! - Linux/Unix社区 / 程序开发区
我的程序实现的是:循环校验码的生成 以及 校验
但是 发现在linux环境下 怎么不出现结果啊? 光标闪闪的就是不出现结果
还望高手 指点 亲自运行一下
这个问题已经纠结我好久了
万分感谢
代码如下:
#include <stdio.h>
#include <string.h>
typedef struct
{
unsigned char data[16];
short checksum;
} dataset; /***分组中的16个8位数***/
typedef struct
{
short flag;
dataset data[6];
} ft3frame; /***ft3帧格式****/
short GetCheckSum(char *data1,int num) /**校验码计算**/
{
int i,j,k,x1,x2;
unsigned char temp[18];
for(i=0;i<num;i++)
temp[i+2]=data1[i];
temp[0]=temp[1]=0;
x1=0x13d65;
k=num*8+1; /**k用来控制移动的次数**/
do
{
x2=(temp[0]<<24)+(temp[1]<<16)+(temp[2]<<8)+temp[3];
if(x2<0x10000)
{
for(i=0;i<18;i++)
{
temp[i]=temp[i]<<1+temp[i+1]>>7;
}
k--;
}
else
{
x2=
相关问答:
写了个测试程序如下
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
......
谁能帮我把下面这些代码改成VB形式的,多谢了,急用~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[],float g ......
如题:c 语言里浮点相乘 为什么小数全为0了
float x=8266.206055;
float y=7226.922363;
float z;
z=x*y;
z=59739228.000000;
为什么得到的Z 小数点后面全为0了
呵呵,超出浮点能表示范围了。
麻烦有人知道 ......
大家好,我是新手,刚开始接触C/S结构的程序,想要实现一个分页功能,大家有没有好点的分页控件或者程序之类的,当然源程序更好,否则说说流程也可以,小妹急啊,在线等。。。。
大家帮帮忙,谢了!
自己写呀!
......