wfnh 的 站内主页
2008
04-01
04-01
2008
02-18
02-18
DEV C++里建立一个工程,有好几个文件,编译就是不通过,会出“dereferencing pointer to incomplete type”错误!单个就可以,代码是没问题的!
main.c代码:
#include "Stdio.h"#include "stdlib.h"#define LEN sizeof(struct student)struct student{ &nbs....
Read More >
2008
02-18
02-18
对于链表来说,怎样free 呢?SAMPLE:
#include "Stdio.h"#include "stdlib.h"#define LEN sizeof(struct student)struct student{ long num; char name[10]; float sco....
Read More >
帮忙调试一个函数
大虾,帮忙调试一下:struct student * creat_list_a(void){ struct student * head=NULL,*ppre=NULL,*pafter=NULL; ppre=pafter=(struct student *)malloc(sizeof(struct student));&nbs....
Read More >
传递动态分配内存函数:
使用指向指针的指针保存分配存储内存的首地址void alloc_mem_3(int **p, int num){ *p = (int *) malloc(num);//这里啊!
}
CALL:
alloc_mem_3(&p3, 10 * sizeof(int));//这里啊 !! for....
Read More >
2008
01-29
01-29
我的代码:
/* 标准文档模板 */
#include "Stdio.h"#include "Conio.h"char *copy(char *fstr,int n);
int main(void){ /* 此处添加你自己的代码 */ char * str="0";
int m; printf("please input string:....
Read More >
2008
01-26
01-26
有n个整数,使其前面各数顺序向后移m个位置,最后m个数变成最前面的m个数!!我的代码如下:
#include "Stdio.h"#define size 5void deal(int *parr[],int n,int m);void input(int *arr1[],int x,int arr[]);void output(int *parr[]);int main(void){ ....
Read More >
2007
12-18
12-18
程序目的:编写程序,从键盘输入一行字符,一回车键为结束,分别统计其中的大写字母,小写字母,空格,数字和其他字符的个数!这是我的失败代码:#include <stdio.h>int daxie(char *str);int xiaoxie(char *str);int space(char *str);int num(char *str);void main(){  ....
Read More >
#include <stdio.h>void main(){ int a[10]; int i,*pa=NULL; for (i=0;i<10;i++) scanf("%d",&a[i]); for(pa=a;pa<(pa+9);pa++) printf("%d",*pa);}
结....
Read More >
2007
11-19
11-19
有一题目是这样的;
求2/1+3/2+5/3+8/5...的前二十项和
我设a分子,b为分母
我想这样实现:观测可知,后一项的分子是前一项分子和分母的和,后一项分母是前一项的分子,我想分别计算分子和分母的总和,在用printf("%d/%d",a,b)输出,我想了很久,就想不出实现代码!!
跪求高手帮忙啊!!....
Read More >
2007
11-19
11-19
#include <math.h>void main(){ int a,b,c=0; for(a=1;a<=100;a++) for(b=2;b<=100;b++) { c=a*a+b*b;&nbs....
Read More >
这是小弟的"学生成绩管理系统"有很大问题,高人帮忙调试一下!
代码如下:(有点臃肿)
先谢了!!!....