91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1.16MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-10-30
  • 語言: 其他
  • 標(biāo)簽: A??Text??Editor??

資源簡介

很好用的文本編輯器,包含了對字符串的一系列操作,一定對編程者是很好的作用

資源截圖

代碼片段和文件信息

#include?“Utility.h“
#include?“dbl_lk_list.h“
#include?“String.h“
#include?“Editor.h“


void?main(int?argc?char?*argv[]) //?命令行參數(shù)
//?前提條件:?在命令行中給出輸入文件和輸出文件
//?操作結(jié)果:?讀輸入文件各行到文本緩存中,執(zhí)行簡單的行編輯并寫文本緩存到輸出文件中
{
char?infName[256]outfName[256];

if?(argc? { //?argc? cout?< strcpy(infName?read_in(cin).c_str());
if?(strlen(infName)?==?0)
{ //?infName為空
strcpy(infName?“file_in.txt“);
}
}
else
{ //?將argv[1]復(fù)制給infName
strcpy(infName?argv[1]);
}

ifstream?file_in(infName);???//?定義并打開輸入文件流
if?(file_in?==?0)?{
cout?< exit(1);
}

if?(argc? { //?argc? cout?< strcpy(outfName?read_in(cin).c_str());
if?(strlen(outfName)?==?0)
{ //?outfName為空
strcpy(outfName?“file_out.txt“);
}
}
else
{ //?將argv[2]復(fù)制給outfName
strcpy(outfNameargv[2]);
}

ofstream?file_out(outfName);???//?定義并打開輸出文件流.
if?(file_out?==?0)?{
cout?< exit(2);
}

Editor?buffer(&file_in?&file_out); //?定義文本緩存
while?(buffer.get_command())
{ //?接收并執(zhí)行用戶操作命令
buffer.run_command();
}
}


//?實用頭文件

//?ANSI?C++標(biāo)準(zhǔn)庫頭文件
#include? //?標(biāo)準(zhǔn)串和操作
#include? //?標(biāo)準(zhǔn)流操作
#include? //?極限
#include? //?數(shù)據(jù)函數(shù)
#include? //?文件輸入輸出
#include????????//?字符處理
#include?????????//?日期和時間函數(shù)
#include? //?輸入輸出控制
#include???????//?標(biāo)準(zhǔn)庫
#include????????//?標(biāo)準(zhǔn)輸入輸出
#include? //?輸入輸出流格式設(shè)置
#include?? //?支持變長函數(shù)參數(shù)
using?namespace?std; //?標(biāo)準(zhǔn)庫包含在命名空間std中

//?自定義類型
enum?Status_code?{SUCCESS?FAIL?UNDER_FLOW?OVER_FLOWRANGE_ERROR?DUPLICATE_ERROR
NOT_PRESENT?ENTRY_INSERTED?ENTRY_FOUND};




#ifndef?__CIRC_LK_LIST_H__
#define?__CIRC_LK_LIST_H__

//?結(jié)點類
template?
struct?DblNode?
{
//?數(shù)據(jù)成員:
ElemType?data; //?數(shù)據(jù)域
DblNode?*back; //?指向前驅(qū)的指針域
DblNode?*next; //?指向后繼的指針域

//?構(gòu)造函數(shù):
DblNode(); //?無數(shù)據(jù)的構(gòu)造函數(shù)
DblNode(ElemType?item?
DblNode?*linkBack?=?NULL
DblNode?*linkNext?=?NULL);//?已知數(shù)數(shù)據(jù)域和指針域建立結(jié)構(gòu)
};


//?循環(huán)鏈表類
template?
class?DbllinkList?
{
protected:
//??循環(huán)鏈表實現(xiàn)的數(shù)據(jù)成員:
DblNode?*head; //?頭結(jié)點指針
mutable?int?curPosition; //?當(dāng)前位置的序號
mutable?DblNode?*?curPtr; //?指向當(dāng)前位置的指針
int?count; //?元素個數(shù)

//?輔助函數(shù)
DblNode?*GetElemPtr(int?position)?const; //?返回指向position個結(jié)點的指針
void?Init(); //?初始化線性表

public:
//??抽象數(shù)據(jù)類型方法聲明及重載編譯系統(tǒng)默認方法聲明:
DbllinkList(); //?無參數(shù)的構(gòu)造函數(shù)
~DbllinkList(); //?析構(gòu)函數(shù)
int?Length()?const; //?求線性表長度 ?
bool?Empty()?const; //?判斷線性表是否為空
void?Clear(); //?將線性表清空
void?Traverse(void?(*Visit)(ElemType?&))?; //?遍歷線性表
Status_code?GetElem(int?position?ElemType?&e)?const;//?求指定位置的元素
Status_code?SetElem(int?position?const?ElemType?&e);//?設(shè)置指定位置的元素值
Status_code?

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????7713??2010-11-15?23:19??Editor\dbl_lk_list.h

?????文件?????581715??2010-11-15?23:20??Editor\Debug\Editor.exe

?????文件?????837300??2010-11-15?23:20??Editor\Debug\Editor.ilk

?????文件?????441633??2010-11-15?23:20??Editor\Debug\Editor.obj

?????文件????2583516??2010-11-15?23:20??Editor\Debug\Editor.pch

?????文件????1180672??2010-11-15?23:20??Editor\Debug\Editor.pdb

?????文件??????99328??2010-11-15?23:20??Editor\Debug\vc60.idb

?????文件?????135168??2010-11-15?23:20??Editor\Debug\vc60.pdb

?????文件??????26091??2010-11-15?23:46??Editor\Editor.cpp

?????文件???????4528??2010-11-15?23:19??Editor\Editor.dsp

?????文件????????537??2010-11-15?23:19??Editor\Editor.dsw

?????文件?????581715??2010-11-15?23:20??Editor\Editor.exe

?????文件???????9471??2010-11-15?23:20??Editor\Editor.h

?????文件??????91136??2010-11-15?23:20??Editor\Editor.ncb

?????文件??????54784??2010-11-15?23:20??Editor\Editor.opt

?????文件???????1224??2010-11-15?23:20??Editor\Editor.plg

?????文件???????8218??2010-11-15?23:20??Editor\extend_dbl_lk_list.h

?????文件?????????34??2010-11-16?00:49??Editor\file_in.txt

?????文件?????????30??2010-11-16?08:39??Editor\file_out.txt

?????文件???????6529??2010-11-15?23:20??Editor\String.h

?????文件????????745??2010-11-15?23:20??Editor\Utility.h

?????目錄??????????0??2010-11-16?16:13??Editor\Debug

?????目錄??????????0??2010-11-16?16:13??Editor

-----------?---------??----------?-----??----

??????????????6652087????????????????????23


評論

共有 條評論