A. 設計一個簡單的文本編輯器,使其具有通常編輯器(如Notepad)具備的功能。用c++怎麼編寫,要程序具體代碼

Notepad++ 本身就是一個優秀的用C++寫的開源的文本編輯器啊,開源軟體,直接去下載源代碼就好了,然後再它基礎上繼續開發啊。這里就有Notepad++的源代碼的下載,你可以去看一下,地址是http://www.jubaopen.com/notepad.html 或者你也可以直接去官方看看。

B. 如何實現一個簡單的文本編輯器 知乎

JDK自帶一個簡單的Notepad,你可以研究一下他的源代碼。 在%java_HOME%\demo\jfc\Notepad 目錄下 JDK自帶一個稍復雜的Stylepad,你可以研究一下他的源代碼。 在%JAVA_HOME%\demo\jfc\Stylepad目錄下

C. 求一個簡易文本編輯器 源代碼c 語言!!!

notepad++
如其所名,是可用於C++\C等一類編程語言的notepad。
我現在用的就是這個。。用的很舒服。樓主要求的功能都是有的, 當然樓主最好自己去下一個看看。。。免得說我騙人。
界面很好看,根據文件後綴名的不同對數字,關鍵詞等還有顏色的調整。
如果樓主還需要編譯功能的話,notepad++有對應的插件,這個樓主可以網路「notepad++配置c語言環境」,有很多不錯的教程

D. 跪求純c++的簡易文本編輯器代碼,求你們了,有的話給我一份。我思考很久了,

Sales_data trans;
while(std::cin>>trans){
if(total.booKNO==trans.booKNO)
total+=trans;
else{
std::cout<<total;

E. 用c語言設計一個簡單的文本編輯器,如何編寫程序代碼

你是要製作出一個類似於微軟的文本文檔的東西嗎?

F. 用C語言編寫一個簡單的文本編輯器.

不會..

G. 怎麼去實現一個簡單文本編輯器

1.設計目的
簡易文本編輯器是一個面向用戶的系統服務程序,廣泛用於源程序的輸入、刪除、替換、查找、修改等一系列操作,甚至用於報刊和書籍的編輯排版以及辦公室的公文書信的起草和潤色,是一個比較實用的應用軟體。該程序是專門為用戶做文本編輯而精心設計的,可以滿足文本操作的大部分要求。
2.設計內容和要求
(1)讀取(文本)文件建立新字元串(2)查看源(文本)文件內容和組成信息(3)查看當前字元串(4)查看當前字元串的組成信息(5)查找指定位置開始的指定長度字元串(6)查找指定的字元串的位置(7)在當前字元串指定的位置插入字元串(8)從當前字元串中刪除指定的子字元串(9)替換當前字元串指定的子字元串(10)保存對(文本)文件的修改
(11) 另存為(文本)文件 (12) 退出程序
3.本設計所採用的數據結構
在該程序中用到的數據結構只有鏈表
程序中所使用的基本操作和存儲結構均採用串的鏈式存儲結構,並定義相應的操作函數。
typedef struct _String//定義鏈串結構
{char character ;//組成串的字元( 數據域 )
struct _String* next ;//指向下一串結構的指針( 鏈域 )
} String ;//串類型
4.功能模塊詳細設計
4.1詳細設計思想
該程序所使用的基本操作和存儲結構為採用串的鏈式存儲結構,並定義相應的操作函數。文本編輯的操作調用以下函數並結合庫函數來實現文本編輯的圖形界面。
定義鏈式存儲結構:
typedef struct _String//定義鏈串結構
{
char character ;//組成串的字元( 數據域 )
struct _String* next ;//指向下一串結構的指針( 鏈域 )
} String ;//串類型
定義串的信息結構:
typedef struct _StringInformation//定義串信息結構
{
String* str ;//鏈串首結點
int letters_count ;//字母個數
int figures_count ;//數字個數
int space_count ;//空格個數
int endline_count ;//換行符個數
int others_count ;//其他字元個數
int characters_count ;//總字元個數
} StringInformation ;//串信息類型
定義串的引索結構:
typedef struct _Index//定義串索引結構
{
int sub_index ;//子串在其父串的位置( 或索引 )
struct _Index* next_index ;//指向子串的下一個串索引結構的指針
} Index ;//串索引類型

所要調用的子函數有:
int StringToUnsignedInt( char* s , int max );//字元串轉換成無符號整數
void InitalizeStringInformation( StringInformation* SI , int initalizeAll ) ;//串信息初始化
void CreatStringFromArray( String** S , char* cString ) ;//從字元數組建立字元串
int CreatStringFromFile( String** S ,char* filePath ) ; //從文件建立字元串
int StringLength( String* S ) ;//求串長
int StringCompare( String* S1 , String* S2 ) ;//串比較
void StringCopy( String** targetString , String* sourceString ) ;//串拷貝
void SubString(String* S ,int index ,int subLength ,String** subS ) ;//子串提取
int SubStringIndex( String* S , String* subS ) ; //求子串在父串首次出現的位置
int StringInsert( String** S , int index , String* insertedString ) ; //串插入
int SubStringDelete( String** S , int index , int subLength ) ; //子串刪除
void PrintString( String* S ) ;//串輸出
void PrintIndex( Index* subIndex ) ;//子串的所有索引輸出
void PrintStringInformation( StringInformation* SI ) ;//串組成信息輸出
void SaveToFile( String* S , char* filePath ) ;//保存字元串到文件
void DestroyString( String** S ) ;//串銷毀
void DestroyIndex( Index** subIndex ) ;//子串索引銷毀
(1)讀取(文本)文件建立新字元串
該函數的設計思想為從字元數組建立字元串或者從文件建立字元串。就文件建立字元串而言,首先要定義一個串StringInformation
S,tempString = S.str,然後打開計算機中的txt文件gets( filePath ),
調用函數CreatStringFromFile( &S.str , filePath )將filePath寫入字元串S中來實現 。
(2)查看源(文本)文件內容和組成信息
先要調用函數PrintString(
Source.str )來進行串輸出,然後調用子函數PrintStringInformation( &Source
)將串組成信息輸出,最後將串銷毀DestroyString( &Source.str )。
(3)查看當前字元串
先要清屏system( "cls" );然後調用子函數PrintString( S.str )將串S輸出。
(4)查看當前字元串的組成信息
調用子函數PrintStringInformation( &S )將串S的組成信息輸出
(5)查找指定位置開始的指定長度字元串
先輸入字串的起始位置gets(
input ),position = StringToUnsignedInt( input , -1 )
調用該函數將input轉換成無符號整數並將值賦予position;然後再輸入子字元串的長度gets( input ),subLength =
StringToUnsignedInt( input , -1
)調用此函數將input轉換成無符號整數並將值賦予subLength,然後調用該函數 SubString( S.str , position ,
subLength , &subString )進行子串提取;
(6)查找指定的字元串的位置
首先要輸入將要查找的字元串gets(
cString ),CreatStringFromArray( &subString , cString
)然後調用該函數將cString置為串subString,調用SubStringIndexAll( S.str , subString ,
&subIndex )輸出子串subString在父串S中出現的所有位置,然後銷毀subString 。
(7)在當前字元串指定的位置插入字元串
首先請輸入將插入字元串的位置 gets( input ),然後調用函數position = StringToUnsignedInt( input , -1 )將input轉換成無符號整數並將值賦予position;
再輸入將插入的字元串
gets( cString ),CreatStringFromArray( &newString , cString
)用字元數組建立字元串法建立newString,然後再調用函數StringInsert( &S.str , position ,
newString )將newString插入文件S.str中,然後再銷毀newString。
(8)從當前字元串中刪除指定的子字元串
首先輸入將刪除的子字元串gets(
cString ),然後調用函數CreatStringFromArray( &subString , cString
)建立新的字元串subString,調用函數count = SubStringIndexAll( S.str , subString ,
&subIndex )輸出子串subString在父串S中出現的所有位置。
然後輸入將要刪除的子字元串的位置gets(
input ),position = StringToUnsignedInt( input ,
-1)調用該函數將input轉換成無符號整數並將值賦予position ;
再調用函數將子字元串刪除SubStringReplaceSingle( &S.str , position , subString ,
NULL )。
(9)替換當前字元串指定的子字元串
先輸入將被替換的子字元串 gets( cString )
,CreatStringFromArray( &subString , cString
)調用函數將cString生成字元串subString ,調用函數SubStringIndexAll( S.str , subString ,
&subIndex )輸出子串subString在父串S中出現的所有位置。
再輸入將替換的子字元串的位置gets(
input ),將輸入的input轉換為無符號整形position = StringToUnsignedInt( input , -1 );
然後輸入一個字元串以替換上面的字元串 gets( cString ),調用CreatStringFromArray(
&replaceString , cString )將輸入的cString CreatStringFromArray(
&replaceString , cString
)置成新串replaceString,然後調用函數SubStringReplaceSingle( &S.str , position ,
subString , replaceString )替換子字元串 ,然後銷毀subString。
(10)保存對(文本)文件的修改
調用函數SaveToFile( S.str , filePath )將已修改的文本保存
(11)另存為(文本)文件
先輸入將另存為的文件的絕對路徑 gets( anotherPath )。然後再調用函數SaveToFile( S.str , anotherPath )另存文件
(12)退出程序
調用函數DestroyString( &S.str )將字元串S銷毀,退出程序

H. 急求簡單文本編輯器的C語言源代碼,源程序 VC++6.0

我曾經在資源吧看到過,你去找找吧,肯定有。

I. java語言寫一個文本編輯器的源代碼

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.event.*;
import java.util.*; //Date needed
import java.io.PrintWriter;
public class NotePad extends JFrame
{
JTextArea jta;
class newl implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
jta.setText("");
}
}

class openl implements ActionListener
{ public void actionPerformed(ActionEvent e)
{
JFileChooser jf=new JFileChooser();
jf.showOpenDialog(NotePad.this);

}

}
//保存文件的監聽
class savel implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
JFileChooser jf = new JFileChooser();
jf.showSaveDialog(NotePad.this);

}
}
//列印的監聽 ?
class printl implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
// PrintWriter p = new PrintWriter(NotePad.this);
}
}
//退出記事本的監聽
class exitl implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
System.exit(0);//退出
}
}

//拷貝的監聽
class l implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
jta.();
}
}

//粘貼的監聽
class pastel implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
jta.paste();
}
}
//剪切的監聽
class cutl implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
jta.cut();
}
}
//查找的監聽

//添加日期的監聽
class datel implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
Date d=new Date();
jta.append(d.toString());
}
}

//構造函數
public NotePad()
{
jta=new JTextArea("",24,40);
JScrollPane jsp=new JScrollPane(jta);
JMenuBar jmb=new JMenuBar();
JMenu mFile=new JMenu("File");
JMenu mEdit=new JMenu("Edit");

JMenuItem mNew=new JMenuItem("New",KeyEvent.VK_N);
mNew.addActionListener(new newl());
mFile.add(mNew);

JMenuItem mOpen=new JMenuItem("Open",KeyEvent.VK_O);
mOpen.addActionListener(new openl());
mFile.add(mOpen);

JMenuItem mSave=new JMenuItem("Save");
mSave.addActionListener(new savel());
mFile.add(mSave);

mFile.addSeparator(); //添加分割線

JMenuItem mPrint = new JMenuItem("Print");
mPrint.addActionListener(new printl());
mFile.add(mPrint);

mFile.addSeparator(); //添加分割線

JMenuItem mExit=new JMenuItem("Exit");
mExit.addActionListener(new exitl());
mFile.add(mExit);
mFile.setMnemonic(KeyEvent.VK_F);

//編輯菜單的子菜單的處理
JMenuItem jmi;
jmi=new JMenuItem("Copy");
jmi.addActionListener(new l());
mEdit.add(jmi);

jmi=new JMenuItem("Cut");
jmi.addActionListener(new cutl());
mEdit.add(jmi);

jmi=new JMenuItem("Paste");
jmi.addActionListener(new pastel());
mEdit.add(jmi);

mEdit.addSeparator(); //添加分割線

jmi=new JMenuItem("Find");

mEdit.add(jmi);

jmi=new JMenuItem("FindNext");
mEdit.add(jmi);
mEdit.addSeparator();
jmi=new JMenuItem("Select All");
mEdit.add(jmi);
jmi=new JMenuItem("Date/Time");
jmi.addActionListener(new datel());
mEdit.add(jmi);

jmb.add(mFile);
jmb.add(mEdit);

this.setJMenuBar(jmb);

this.getContentPane().add(jsp);
this.setSize(200,200);
this.setVisible(true);
}
//主函數,程序入口點
public static void main(String s[])
{
new NotePad();
}

}

J. c語言編寫簡易的文本編輯器

我這里有一個功能強大文本編譯器程序的完整c代碼,是外國人寫的。不好意思,很長,發不上來。
不過這里有一個簡易文本編譯器。雖說是簡易,也不是那麼好弄的,給你:
http://..com/question/79338502.html