易截截图软件、单文件、免安装、纯绿色、仅160KB

关于线性表的C程序,语法问题?不会吧

错误就下面三行,(看到的帮我看看是哪里的问题啊)
 \MSDev98\MyProjects\example\ex.c(117) : error C2449: found '{' at file scope (missing function header?)
F:\MSDev98\MyProjects\example\ex.c(120) : error C2059: syntax error : '}'
F:\MSDev98\MyProjects\example\ex.c(122) : error C2059: syntax error : '}'
执行 cl.exe 时出错.
/*10.3.2源程序*/
/******头文件(.h)***********/
#include <windows.h>
#include <conio.h>
#include "stdio.h"   /*I/O函数*/
#include "stdlib.h" /*标准库函数*/
#include "string.h"/*字符串函数*/
#include "ctype.h" /*字符操作函数*/
#define M 50  /*定义常数表示记录数*/
typedef struct /*定义数据结构*/
{
   char name[20]; /*姓名*/
   char units[30];  /*单位*/
   char tele[10];  /*电话*/
}ADDRESS;
/******以下是函数原型*******/
void gotoxy(int a,int b);
int enter(ADDRESS t[]); /*输入记录*/
void list(ADDRESS t[],int n); /*显示记录*/
void search(ADDRESS t[],int n); /*按姓名查找显示记录*/
int Delete(ADDRESS t[],int n); /*删除记录*/
int  add(ADDRESS t[],int n); /*插入记录*/
void save(ADDRESS t[],int n); /*记录保存为文件*/
int load(ADDRESS t[]);  /*从文件中读记录*/
void display(ADDRESS t[]); /*按序号查找显示记录*/
void sort(ADDRESS t[],int n); /*按姓名排序*/
void qseek(ADDRESS t[],int n); /*快速查找记录*/
void copy();  /*文件复制*/
void print(ADDRESS temp); /*显示单条记录*/
int find(ADDRESS t[],int n,char *s) ; /*查找函数*/
int menu_select();  /*主菜单函数*/
/******主函数开始*******/
main()
{
   ADDRESS adr[M];  /*定义结构体数组*/
   int length;  /*保存记录长度*/
   system("clr");  /*清屏*/
   for(;;)/*无限循环*/
   {
      switch(menu_select())   /*调用主菜单函数,返回值整数作开关语句的条件*/
      {
  case 0:length=enter(adr);break;/*输入记录*/
  case 1:list(adr,length);break; /*显示全部记录*/


相关文档:

linux下c语言连接mysql数据库

在FC8中默认安装的有mysql,没有的话可以很方便的安装下。
默认的mysql的include文件目录在/usr/include/mysql
默认的mysql的lib文件夹在/usr/lib/mysql
这两个目录在我们编译时候需要到。
我的测试用的C代码为:
#include <stdio.h>
#include <stdlib.h>
#include <mysql.h>
#define CONN_HOST ......

c 语言中的传值与传引用


#include<stdio.h>
int cubeByValue(int n);
int main(){
    int number = 5 ;
    printf("The original value of number is %d\n",number);
    number = cubeByValue(number);   
    printf("The new  ......

linux I2C驱动分析

I2C是Phillips开发的2线的串行总线协议。通常应用在嵌入式系统中让不同的组件通信,PC主板可以通过I2C来与不同的传感器通信。这些传感器通常报告风扇速度,处理器温度和整个硬件系统的信息,这个协议也可以用在RAM chips上,向操作系统提供DIMM的信息。
在2.0时I2C的kernel源码不在内核里的,2.4内核包括了一点对I2C的支持 ......

解析xml org.w3c.dom


1.要解析的XML文件如下:
<?xml version="1.0" encoding="GB2312"?>
<?xml-stylesheet href="student.xsl" type="text/xsl"?>
<StudentInfo>
 <student>
  <name>达内</name>
  <sex>男</sex>
  <lesson>
   ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号