freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

家譜管理系統(tǒng)設(shè)計(jì)(編輯修改稿)

2025-05-15 12:09 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 temp。 DestroyFamilytree()。 return result。 } parentT=0。 Find(T,parentT,parentname)。 //找到parentname所在結(jié)點(diǎn)parentT if(parentT){ //如果parentT存在,說(shuō)明parentname在家譜中 //并且parentname為temp的父親 int cmp。 cmp=CompareDate(temp,parentT)。 if(cmp0){ //若孩子出生日期比父親大,則不對(duì) delete temp。 DestroyFamilytree()。 return FILE_DATA_NOT_PRACTICAL。 } tempchild=tempsibling=0。 tempparent=parentT。 //temp的父指針指向parentT。 if(parentTchild){ //parentname已經(jīng)有孩子 InsertSibling(parentTchild,temp)。 }//if else //parentname無(wú)孩子,則temp應(yīng)為 parentTchild=temp。 //parentname的第一個(gè)孩子 }//if else{ //parentT不存在,說(shuō)明家譜中不存在parentname此人 DestroyFamilytree()。 //返回出錯(cuò)信息 return FILE_DATA_ERROR。 } temp=new PersonNode。 //申請(qǐng)一結(jié)點(diǎn) if(!temp){ //申請(qǐng)失敗 DestroyFamilytree()。 //釋放申請(qǐng)空間 return NOT_ENOUGH_MEMORY。 } result=ReadNode(fp,temp,parentname)。 //繼續(xù)讀取數(shù)據(jù) }//while if(temp) delete temp。 fclose(fp)。 return OK。} 添加成員兄弟模塊 圖53 添加成員兄弟模塊void SaveNode(FILE *fp, Person amp。pNode){ //本函數(shù)向文件fp中存取一結(jié)點(diǎn)pNode char ch=39。\n39。 if(pNode){ fprintf(fp,%s %d %d %d %d %s %d ,pNode,pNode, pNode,pNode,pNode, pNode,pNode)。 if(pNode==0) fprintf(fp, %d %d %d ,pNode,pNode, pNode)。 if(pNodeparent) //家譜結(jié)束 fprintf(fp, %s ,pNodeparent)。 else fprintf(fp, %s,1)。 fprintf(fp, %c,ch)。 }}int COperationFamilytree::SaveFamilytree(CString filename){ //本函數(shù)保存家譜到文件filename中 FILE* fp。 if((fp=fopen(filename,w))==0) //打開文件filename return WRITE_FILE_ERROR。 PreOrderTraverse(fp,T,SaveNode)。 //從根結(jié)點(diǎn)開始存儲(chǔ)家譜數(shù)據(jù) //置家譜數(shù)據(jù)結(jié)束標(biāo)記(一結(jié)點(diǎn)的名字與其父結(jié)點(diǎn)的名字同為end) fprintf(fp,%s %d %d %d %d %s %d %s,end,1999,12, 2,1,end,1,end)。 fclose(fp)。 return OK。}void COperationFamilytree::PreOrderTraverse(FILE* fp,Person amp。T, void (__cdecl *Visit)(FILE* fp,Person amp。)){ //本函數(shù)把所有以T結(jié)點(diǎn)為根結(jié)點(diǎn)的結(jié)點(diǎn)值存到文件fp中 if(T){ (*Visit)(fp,T)。 PreOrderTraverse(fp,Tchild,Visit)。 PreOrderTraverse(fp,Tsibling,Visit)。 }} 按照出生日期對(duì)家譜排序void CFamilytreeDlg::OnFamilytreeSort() { // TODO: Add your mand handler code here RefreshList()。 QuickSortNode* order。 int totalNums=0。 ((),totalNums)。 order=new QuickSortNode[totalNums+1]。 if(!order){ AfxMessageBox(內(nèi)存不足!)。 return。 } AfxMessageBox(排序后結(jié)果請(qǐng)見下部列表。)。 (order)。 for(int i=1。itotalNums+1。i++) DisplayInListCtrl(order[i].oneself)。 delete []order。}void COperationFamilytree::SortByBirthday(QuickSortNode *order){ //本函數(shù)對(duì)順序表order以出生日期的大小排序 int totalNums=0。 QuickSortNode* startaddr=order。 startaddr++。 GetPersonNums(T,totalNums)。 CopyInfoFromBiTreeToArray(T,startaddr)。 QuickSort(order,1,totalNums)。}int COperationFamilytree::Partition(QuickSortNode *order, int low, int high){ //本函數(shù)供QuickSort函數(shù)調(diào)用 //交換順
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1