❶ 学生信息管理系统的学生登录界面做成C/S结构,要怎么通过联网访问数据库(数据库与学生登录程序不在一台机
C/S系统本来就是服务器-客户机模式,直接就支持局域网访问数据库。
比如说你用c语言或者Java或者其他什么语言,制作窗口程序界面,输入、查询等界面。然后单独写一个连接数据库的连接,你可以通过ODBC也可以通过ADO等多种数据库访问方式,数据库连接好之后,所有的操作可以通过写sql语句也可以用数据库控件来获得。这个和你使用的开发语言有关
最关键的是,在局域网访问数据库,需要在连接数据库时,写上IP地址或者主机名称,另外一定要选用sql server等非单机数据库,至少access不行。
具体操作和代码,每种语言的书里都有很详细的,我只是把这种模式的应用简单给你描述一下,让你思路清晰一点。
❷ 用C语言做 学生宿舍管理系统
孩子 很清楚这是老师给你的作业题 ,,知识是被网络不出来的,,强烈建议看到此题的同仁不给出答案,,,,孩子 你自己试着写,,那不会,随时问 我们会解答 但你这是直接问作业 那老师还让你写干嘛???给你思路 那个合法才能进入,,只需要用个判断句就行,先输入密码 正确 则继续执行 错误 输出提示信息,,当然 这里你可以加一点花招 连续输入3次 直接退出程序或者等待1分钟才行,,哈哈 这个你可以写完不给老师说密码,然后老师输入,,哈哈 其他的的代码就是链表的知识了 课本上也都有的,,,,,好好学习啊 中国需要脚踏实地的程序员,,不要投机取巧,,
❸ 如何用c语言程序编一个管理系统
结构定义如下,其他的自己写吧,内容太多了
struct user_info {
char[10] user_code;
char[10] user_name;
char[10] passeord;
char user_limit;
}
❹ C语言程序的联网指令怎么写
你是问socket吗?你是要windows的还是linux的,这两个有区别的。一般用户空间的套接字,三中,流式套接字,数据包套接字,原始套接字前两种分别对应TCP和UDP,第三种是用户自己填写skb,也就是数据包。TCP需要三次握手UDP是无连接的你问题具体一些,我再根据你说的回答你。
❺ 急求C语言学生成绩管理系统怎么连接数据库
基于你的题目学生成绩管理系统,我们可以提供一份代码,适用于初学者的,
如有具体需求,可以我们联系,,联系我们需要提供你的问题和电子邮件,有时间可以帮你,绝对救急,使用网络_Hi给我留言,
此回复对于所有需求和和来访者有效,
ES:\\
❻ c语言员工管理系统求教 急!!
楼主,我编出来了
第一次编这个,算算用了12个小时左右,汗~
程序如下
----------------------------------------------------
/*每个员工的信息包括:编号、姓名、性别、出生年月、学历、职务、电话、住址等。系统能够完成员工信息的查询、更新、插入、删除、排序等功能。
(1) 排序:按不同关键字,对所有员工的信息进行排序。
(2) 查询:按特定条件查找员工。
(3) 更新:按编号对某个员工的某项信息进行修改。
(4) 插入:加入新员工的信息。
(5) 删除:按编号删除已离职的员工的信息。
(6) 程序要求操作方便,灵活。*/
#include <stdio.h>
#include <stdlib.h>
#include <windows.h> //清屏函数头文件
#include <string.h>
struct Stuff
{
char number[10]; //员工编号
char name[10]; //员工姓名
char sex[8]; //员工性别
char borth[10]; //员工生日
char degree[20]; //员工学历
char business[20]; //员工职务
char phone[15]; //员工电话
char place[50]; //员工住址
char con[50]; //判断关键字专用
struct Stuff *next;
};
char Menu(void); //菜单显示
struct Stuff *App(struct Stuff *head); //添加
void Sort(struct Stuff *head); //排序
struct Stuff *Ser(struct Stuff *head); //查找
void Chn(struct Stuff *head,char n[10]); //更改
void Scpy(char *p,char *q); //排序中用于交换员工信息
struct Stuff *Del(struct Stuff *head,char n[10]); //删除
int Sel(char ch,struct Stuff *p,struct Stuff *q); //判断排序及关键字专用函数
void Prf(struct Stuff *head); //输出
void Fre(struct Stuff *head); //释放
int i=1; //定义全局变量,实现实时员工人数统计
int main(void)
{
char n[10];
struct Stuff *head=NULL; //链表头指针定义
while(1)
{
switch(Menu())
{
case '1':
printf("请输入员工信息,直接输入'#'结束\n");
head=App(head);
break;
case '2':
Sort(head);
break;
case '3':
head=Ser(head);
break;
case '4':
printf("员工信息如下:\n");
Prf(head);
break;
case '5':
printf("请输入员工编号:");
scanf("%s",n);
Chn(head,n);
break;
case '6':
printf("请输入员工编号:");
scanf("%s",n);
head=Del(head,n);
break;
case '0':
printf("欢迎下次光临,88!\n");
exit(0);
default:
printf("输入错误,请重新输入!\n");
}
fflush(stdin); //清楚缓冲区
printf("按任意键继续~");
getchar();
system("cls"); //清屏效果
}
Fre(head);
return 0;
}
//菜单函数
char Menu(void)
{
char ch;
printf("------------请选择-----------\n");
printf("1.添加员工信息\n2.员工信息排序\n3.查找员工信息\n4.输出员工信息\n5.更改员工信息\n6.删除员工信息\n0.退出\n-----------------------------\n");
scanf(" %c",&ch);
return ch;
}
//添加成员函数
//输入参数:链表头指针
//返回参数:链表头指针
struct Stuff *App(struct Stuff *head)
{
struct Stuff *p=NULL,*q=head;
while(i)
{
p=(struct Stuff *)malloc(sizeof(struct Stuff)); //申请结构体空间
if(p==NULL)
{
printf("内存不够!\n");
exit(0);
}
p->next =NULL; //指针域为空
printf("请输入第%d名员工:\n",i);
printf(" 编号 | 姓名 | 性别 | 出生年月 | 学历 | 职务 | 电话 | 住址 :\n");
fflush(stdin);
scanf("%s",p->number );
if(!strcmp(p->number ,"#"))
{
free(p); //释放不需要的结构体内存
break;
}
else
{
++i;
scanf("%s%s%s%s%s%s%s",p->name ,p->sex ,p->borth ,p->degree ,p->business ,p->phone ,p->place );
p->con[0]='\0'; //防止后面判断出现随机值
if(head==NULL)
head=p;
else
{
while(q->next !=NULL) //防止结束后再次输入时出现问题
q=q->next ;
q->next =p;
}
q=p; //每次都加在链表尾
}
}
return head;
}
//排序函数
//输入参数:头指针
void Sort(struct Stuff *head)
{
char ch;
struct Stuff *p,*q,*r;
while(1)
{
printf("请选择排序条件:1.编号2.姓名3.性别4.出生年月5.学历6.职务7.电话8.地址0.退出\n");
scanf(" %c",&ch);
if(ch=='0')
break;
if(ch<'1'||ch>'8')
{
printf("输入错误,请重新输入!\n");
continue;
}
p=head;
while(p->next!=NULL) //选择排序
{
q=p->next;
r=p;
while(q!=NULL)
{
if(Sel(ch,r,q)) //调用判断函数
r=q;
q=q->next;
}
if(r!=p) //交换内容
{
Scpy(r->number,p->number);
Scpy(r->name,p->name);
Scpy(r->sex,p->sex);
Scpy(r->borth,p->borth);
Scpy(r->degree,p->degree);
Scpy(r->business,p->business);
Scpy(r->phone,p->phone);
Scpy(r->place,p->place);
}
p=p->next;
}
Prf(head); //输出
}
}
//交换函数
void Scpy(char *p,char *q)
{
char c[50];
strcpy(c,p);
strcpy(p,q);
strcpy(q,c);
}
//判断函数
//输出参数:1为真,0为假
int Sel(char ch,struct Stuff *p,struct Stuff *q)
{
switch(ch) //实现各个关键字查找
{
case '1':
return strcmp(q->number ,p->number )<0||strcmp(q->con ,p->number )==0 ; //排序条件及查找条件
case '2':
return strcmp(q->name ,p->name )<0||strcmp(q->con ,p->name )==0 ;
case '3':
return strcmp(q->sex ,p->sex )<0||strcmp(q->con ,p->sex )==0 ;
case '4':
return strcmp(q->borth ,p->borth)<0 ||strcmp(q->con ,p->borth )==0 ;
case '5':
return strcmp(q->degree ,p->degree )<0||strcmp(q->con ,p->degree )==0 ;
case '6':
return strcmp(q->business ,p->business )<0||strcmp(q->con ,p->business)==0 ;
case '7':
return strcmp(q->phone ,p->phone )<0 ||strcmp(q->con ,p->phone)==0;
case '8':
return strcmp(q->place ,p->place )<0||strcmp(q->con ,p->place )==0;
default :
exit(0);
}
}
//查找函数
struct Stuff *Ser(struct Stuff *head)
{
struct Stuff *p=NULL,*q,a={"\0","\0","\0","\0","\0","\0","\0","\0"}; //防止判断时错误
int flag; //查找判断
char ch,sh;
q=&a;
while(1)
{
printf("请输入要查找的条件:1.编号2.姓名3.性别4.出生年月5.学历6.职务7.电话8.住址0.退出\n");
scanf(" %c",&ch);
if(ch=='0')
break;
if(ch<'1'||ch>'8')
{
printf("输入错误,请重新输入!\n");
continue;
}
fflush(stdin);
printf("请输入:");
gets(q->con );
p=head; //指向表头
flag=0;
while(p!=NULL)
{
if(Sel(ch,p,q))
{
printf("员工信息如下:\n");
printf(" 编号 | 姓名 | 性别 | 出生年月 | 学历 | 职务 | 电话 | 住址 \n%s %s %s %s %s %s %s %s\n"
,p->number ,p->name ,p->sex ,p->borth ,p->degree ,p->business ,p->phone ,p->place );
printf("是否需要:1.更改 2.删除 3.继续\n");
scanf(" %c",&sh);
if(sh=='1')
Chn(head,p->number); //调用更改函数
else if(sh=='2')
head=Del(head,p->number); //调用删除函数,得到的head必须return
flag=1;
break;
}
p=p->next ;
}
if(flag==0)
printf("没有找到该员工信息!\n");
}
return head;
}
//更改函数
//输入参数:n[10] 为员工编号
void Chn(struct Stuff *head,char n[10])
{
struct Stuff *p=head;
int flag=0;
if(head==NULL)
printf("未找到员工信息!\n");
else
{
while(p!=NULL)
{
if(!strcmp(p->number,n))
{
printf("请输入新的信息:\n编号|姓名|性别|出生年月|学历|职务|电话|住址\n");
scanf("%s%s%s%s%s%s%s%s",p->number ,p->name ,p->sex ,p->borth ,p->degree ,p->business ,p->phone ,p->place );
printf("员工信息如下:\n");
flag++;
break;
}
p=p->next;
}
if(flag==0)
printf("未找到该员工信息!\n");
}
Prf(head);
}
//删除函数
//输入参数:n为员工编号
//输出参数:头指针
struct Stuff *Del(struct Stuff *head,char n[10])
{
struct Stuff *p,*pr;
int flag;
flag=0;
p=head,pr=head;
if(head==NULL)
printf("未找到员工信息!\n");
else
{
while(strcmp(p->number ,n)&&p->next !=NULL)
{
pr=p;
p=p->next ;
}
if(!strcmp(p->number ,n))
{
if(p==head)
head=p->next ;
else
pr->next=p->next ;
free(p);
printf("删除成功!\n");
i--;
}
else
printf("未找到员工信息!\n");
}
Prf(head);
return head;
}
//输出函数
void Prf(struct Stuff *head)
{
struct Stuff *p=head;
int i=1;
while(p!=NULL)
{
printf("%d. %s %s %s %s %s %s %s %s\n"
,i++,p->number ,p->name ,p->sex ,p->borth ,p->degree ,p->business ,p->phone ,p->place);
p=p->next ;
}
}
//释放函数
void Fre(struct Stuff *head)
{
struct Stuff *p;
while(head!=NULL)
{
p=head;
head=head->next ;
free(p);
}
}
❼ 在linux下,如果用C语言程序获取网络利用那个率,类似于window系统任务管理器中的联网,速求
linux有top(自带的)工具,也有atop(需要下载的)工具,具体使用方法可以参考man手册