博文
[置顶] 讨论一个关于简单的学生成绩管理系统(2006-12-20 22:04:00)
摘要:简单用C++写成的程序:
关于学生成绩管理系统:包括:成绩(可以查询,有几个科目)能够查出基本的内容有学号,姓名,性别一个简单的系统:可以通过选择得出相应的答案就像操作系统里的DOS界面.在这里可能少了某些内容.可以自己添加.想请教一下大概的思路.
谢谢参与啊!......
[置顶] C++群英会有意寻求管理员2名(2006-12-11 21:46:00)
摘要:C++群英会有意寻求管理员2名有意者请进入我们的兴趣小组:C++群英会
有意者可以留言啊!谢谢合作!......
[置顶] C++语言的视频教程下载(2006-11-21 21:34:00)
摘要:C++语言的视频教程下载:
http://www.cntvu.net/teaching/vod/C++/C01.rmhttp://www.cntvu.net/teaching/vod/C++/C02.rmhttp://www.cntvu.net/teaching/vod/C++/C03.rmhttp://www.cntvu.net/teaching/vod/C++/C04.rmhttp://www.cntvu.net/teaching/vod/C++/C05.rmhttp://www.cntvu.net/teaching/vod/C++/C06.rmhttp://www.cntvu.net/teaching/vod/C++/C07.rmhttp://www.cntvu.net/teaching/vod/C++/C08.rmhttp://www.cntvu.net/teaching/vod/C++/C09.rmhttp://www.cntvu.net/teaching/vod/C++/C10.rmhttp://www.cntvu.net/teaching/vod/C++/C11.rmhttp://www.cntvu.net/teaching/vod/C++/C12.rm
现在由于网络问题?我感到很抱歉.我会尽量找到可以的网址.
现在可能改成如下:
http://www.ldrtu.com/spdb/sp/rm/c++yy/C01.rm
http://www.ldrtu.com/spdb/sp/rm/c++yy/C02.rm
http://www.ldrtu.com/spdb/sp/rm/c++yy/C03.rm
http://www.ldrtu.com/spdb/sp/rm/c++yy/C04.rm
http://www.ldrtu.com/spdb/sp/rm/c++yy/C05.rm
http://www.ldrtu.com/spdb/sp/rm/c++yy/C06.rm
http://www.ldrtu.com/spdb/sp/rm/c++yy/C07.rm
http://www.ldrtu.com/spdb/sp/rm/c++yy/C08.rm
http://www.ldrtu.co......
[置顶] vc++6.0英文原版(2006-11-21 21:33:00)
摘要:
vc++6.0英文原版http://soft.lwjy.net/%5Crj%5CMicrosoft%20Visual%20C++%206.0%20%BC%F2%CC%E5%D6%D0%CE%C4%C6%F3%D2%B5%B0%E6.rar
......
[置顶] 有兴趣的可以看一下这个龟免赛跑问题(末完整须补充只是一个模版)(2006-11-17 17:37:00)
摘要:// Chapter 5 of C++ How to Program// tortoiseandhare.cpp#include <iostream>using std::cout;using std::endl;#include <cstdlib>#include <ctime>#include <iomanip>using std::setw;const int RACE_END = 70;void moveTortoise(int &);void moveHare(int &);void printCurrentPositions(int,int);/* Write prototype for moveTortoise here *//* Write prototype for moveHare here *//* Write prototype for printCurrentPositions here */int main(){ int tortoise = 1; int hare = 1; int timer = 0; srand( time( 0 ) ); cout << "ON YOUR MARK, GET SET\nBANG &......
[置顶] 欢迎加入我们的C++讨论兴趣小组:群英会(2006-11-17 12:26:00)
摘要:欢迎加入我们的C++讨论兴趣小组:群英会:http://www.programfan.com/team/team.asp?team_id=964......
魔方阵(2007-07-06 21:24:00)
摘要:#include<iostream>#include<iomanip>using namespace std;#define N 50void mofang(int [][N],int );void printf(const int [][N],int );void main(){ int a[N][N]={0}; int m; cout<<"请输入行列数(要为奇数):"<<endl; cin>>m; mofang(a,m); printf(a,m); return ;}void mofang( int b[][N],int n){ int i,j=n/2;int k=2; b[0][j]=1;i=n-1;j++; while(k<=n*n) { if(b[i][j]==0) { b[i][j]=k;k++;i--;j++;} else {i+=2;j--;} if(i==-1&&j!=n) i=n-1; if(j==n&&i!=-1) j=0; if(i==-1&&j==n) {i+=2;j--;} }}void printf(const int b[][N],int n){ for(int i=0;i<n;i++) { for(int j=0;j<n;j++) cout<<setw(3)<<b[i][j]; cout<<endl; }}......
抽签(2007-07-06 21:23:00)
摘要:#include<iostream>using namespace std;void chouqian(int [],int [][4],int ,int);void main(){ int ren[5]={1,2,3,4,5},haoma[5]={1,2,3,4,5}; int M[8][4]={1,0,1,0,0,1,0,0, 1,0,0,1,1,0,0,0, 0,0,1,0,0,1,0,0, 1,0,1,0,0,0,0,1}; chouqian(ren,M,8,4); for(int i=0;i<5;i++) cout<<"第 "<<haoma[i]<<" 名"<<"被 "<<ren[i]<<" 号人抽到。"<<endl; return ;}void chouqian(int a[],int b[][4],int m,int n){ for(int i=0;i<m;i++) for(int j=0;j<n;j++) if(b[i][j]==1) {int t=a[j];a[j]=a[j+1];a[j+1]=t;}}......
约瑟夫(2007-07-06 21:13:00)
摘要:*********.CPP文件*******
#include<iostream>#include"h.h"using namespace std;template<class T>linklist<T>::linklist(T a[],int n){ first=new Node<T> ; first->data=a[n-1]; first->next=first; int i; for( i=0;i<n-1;i++) { Node<T> *s; s=new Node<T>;s->data=a[i]; s->next=first->next; first->next=s; }}template<class T>void linklist<T>::delate(){ Node<T> *p,*pre; pre=first,p=first->next; int count,m; count=2; cin>>m; while(p!=pre) { if (count==m) { cout<<p->data<<' '; pre->next=p->next;delete p;p=pre->next; count=1; } else p=p->next,pre=pre->next,++count; } cout<<p->data; firs......
心灵火花——好的算法应该是精益求精(2007-03-15 21:45:00)
摘要:
心灵火花——好的算法应该是精益求精
1. 把一个具n个元素的数组向左循环移动i个位置的算法设计成具有较好的时间和空间性能。例如abcdefgh向左循环移动3个位置后为defghabc
提示可能三种算法
第一种算法思想:
1步 首先建立一个具有i个元数的临时数组b[i]
2步 将原数组a[n]中的前i个存在临时数组b[i]中
3步 将原数组a[n]中余下的n-I个元往前移i个位置
4步 将临时数组b[i]的元素复制回原数组的后面
算法分析:
该算法使用i个额外的存储空间,使得空间性能降低,也就是以空间换得较小的时间,所以它不是最佳算法
第二种算法思想
1步 首先设计一个函数将数组向左循移动一个位置
2步 调用该算法i 次
算法分析: 该算法由于不开辟临时存储空间,空间性能很好,
但算法的时间性能差,用时间换空间
第三种算法思想
要在有限的资源中解决这个问题似乎很困难,现在
换一个角度看这个问题,把它看作是数组ab转换成
ba ,其中a就代表数组的前i个元素,b代表数中n-i个元
素,这样问题转换成:
a′b→a′b′→(a′b′)′=( b′)′(a′)′=ba
例如把abcdefgh→defghabc
1步 设计一个逆向函数Reversse(intA[ ],int pos,int len)
2步 Reversse(A,0,i-1)→cbadefgh
2步 Reversse(A, i, n-1);→cbahgfed
 ......
