动态构造结构体数组# include # include struct Student{ int age; float score; char name[100];};int main(void){ int len; struct Student * pArr; ...
分类:
其他好文 时间:
2014-07-01 22:33:31
阅读次数:
204
Rect.hstruct CPoint { float x; float y;};typedef struct CPoint CPoint;struct CSize { float width; float height;};typedef struct CSize CSiz...
分类:
编程语言 时间:
2014-06-28 15:10:15
阅读次数:
381
因为公司一直都是做C++开发的,因客户需要要提供C#版本接口,研究了一下C#,发现其强大简洁, 在跨语言调用方面封装的很彻底,提供了强大的API与之交互.这点比JNA方便多了. Java与C#都只能调用C格式导出动态库,因为C数据类型比较单一,容易映射. 两者都是在本地端提供一套与之映射的C#/j....
分类:
编程语言 时间:
2014-06-14 23:21:48
阅读次数:
494
编程题:结构体数组的引用。功能:输出结构体数组各元素的成员值#include<stdio.h>voidmain(){structperson{charname[20];charsex;intage;floatheight;}per[3]={{"LiPing",‘M‘,20,175},{"WangLing",‘F‘,19,162.5},{"ZhaoHui",‘M‘,20,178}};inti;for(i=0;i<3;i++)print..
分类:
其他好文 时间:
2014-05-20 21:31:06
阅读次数:
336
编程题:指针变量指向结构体数组。#include<stdio.h>voidmain(){structperson{charname[20];charsex;intage;floatheight;}per[3]={{"LiPing",‘M‘,20,175},{"WangLing",‘F‘,19,162.5},{"ZhaoHui",‘M‘,20,178}};structperson*p;for(p=per;p<per+3;p++)printf("%-18s%3c%..
分类:
其他好文 时间:
2014-05-20 18:57:32
阅读次数:
255