学生管理系统(c/cpp)
#include
using namespace std;
typedef struct lnode
{
long sno;
char name[20];
struct lnode *next;
}LNode, *LinkList;
LinkList InitList()
{
LinkList head;
head = new LNode;
head->next = NULL;
cout<<"Initialization completed!"< return head;
}
LinkList CreateList()
{
int i, n;
cout<<"Input data number:";
cin>>n;
LinkList q, p, head;
head = new LNode;
head->next = NULL;
q = head;
for (i = 0; i < n; i++)
{
p = new LNode;
cout<<"Input Information:"< cin>>p->sno;
cout<<"name:";
cin>>p->name;
p->next = NULL;
q->next = p;
q = p;
}
return (head);
}
void ListInsert(LinkList &L)
{
int i, j;
LinkList p, s;
p = L;
j = 0;
cout<<"Input Location:"< cin>>i;
while (p->next != NULL && j {
p = p->next;
j++;
}
if (j != i-1)
{
cout<<"You made a wrong locat
相关文档:
1.分类
内部类型 和用户定义类型
2.
整形:bool ,字符型,整形
true 1 flase 0
非零 true & ......
// SnakeMatrix.cpp : Defines the entry point for the console application.
// Create by Xianyi.Ye, May 4,2010
#include "stdafx.h"
#include <iostream.h>
/*
Question: Print a Sanke Matrix as following
i\j 1 2 3 4 5 6
1 1 2 9 10 25 26
2 4 3 8 11 24 27
3 5 6 7 12 23 28
4 16 15 14 ......
1 前言
长期以来,广大程序员为到底是使用Client/Server,还是使用Browser/Server结构争论不休,在这些争论当中,C/S结构的程序可维护性差,布置困难,升级不方便,维护成本高就是一个相当重要的因素。有很多企业用户就是因为这个原因而放弃使用C/S。然而当一个应用必须要使用C/S结构才能很好的实现其功能的时 ......
1.时间表示
在程序当中,我们经常要输出系统当前的时间,比如我们使用date命令的输出结果.这个时候我们可以使用下面两个函数:
#include <sys/time.h>
time_t time(time_t *tloc);
char *ctime(const time_t *clock);
time函数返回从1970年1月1日0 ......
51单片机 Keil C 延时程序的简单研究
by: InfiniteSpace Studio/isjfk, 1.21.2004
任何人都可以在注明原作者和出处的前提下随意转载这篇文章,但不得用于商业目的。
......