学生管理系统(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
相关文档:
<select class="wellId" id="gasOriginWellId" name="gasOriginWellId" value="${mechWellForm.gasOriginWellId}" index="true">
< ......
//为了和DSP兼容,TSint64和TUint64设置成TSint40和TUint40一样的数
//结果VC中还是认为是32位的,显然不合适
//typedef signed long int TSint64;
//typedef unsigned long int TUint64; &nb ......
单线程
Single-Threaded(static) libc.lib
Debug Single-Threaded(static) & ......
一般我们调用shell脚本都用system()来实现,然后发现sytem返回值不好控制而且转换麻烦(还要右移4位即/256),于是我用popen来获取shell的返回值。果然在Unix世界里面,通道就是连结各个方面的桥梁啊!
代码例子如下:
#include<stdio.h>
#include<stdlib.h>
#include<sys/wait.h>
int main (int argc ......