文字編輯器(鍊錶 string 游標移動)

2021-07-24 06:19:12 字數 1079 閱讀 9297

這個給了我很大啟發

#include 

#include

#include

#include

#include

using

namespace

std;

class texteditor

;void texteditor::getname()//獲取檔名

void texteditor::addtext(const

string &text)

void texteditor::inserttext(string text)

void texteditor::movecursor(int origin)/*origin 是初始位置*/

else

}cout

<<"當前游標位置"

<" "

cursor+=offset;

}void texteditor::findtext(const

string&p)

line++;

}if(t==article.end())

void texteditor::deletetext(string &p)

i=s.find(p,0);

if(i==-1)

else

}}void texteditor::wordstat()

}cout

<<"字母個數"

<"數字個數"

<"空格個數"

<"其他個數"

<"字元總個數"

cout

<<"讀取成功"

>i;

break;

case

2:

case

3:

case

4:

case

5:

case

6: }}

}int main()

文字編輯器

include stdio.h include string.h include stdlib.h define len sizeof struct linetable struct linetable main 輸出並加入行號 display struct linetable head else ...

文字編輯器

text editer文字編輯器 data ref container tec type ref to cl gui custom container.data ref edit type ref to cl gui textedit.data text line 85 work area it t...

文字編輯器

uedit notepad mybase 筆記類工具 sublime 列模式操作很牛叉 sublime 快捷鍵 常用類操作模式 1.選擇編輯的行,ctrl l,就可以操作了。2.按住shiftr 鍵盤,滑鼠右鍵選擇欲選擇內容。ctrl l 選擇整行 按住 繼續選擇下行 ctrl kk 從游標處刪除至...