You are here:

C/Creating a text editor using C or C++

Advertisement


Question
Dear Mr. Premnath

My objective is to create a text editor using either C or C++, however I am restricted from using a GUI editor so no VC++ etc.

I've done some research and came across a UNIX text editor called PICO and that is exactly how i wanted my text editor to be.

Now the question is where do i start? Is it better using C or C++, Which books should I be reading, should i be reading a computer graphics books, will that help?

Hopefully you can guide me into the right direction.

Cheers,
Shivek Sachdev

Answer
Dear Shivek Sachdev!
 
  Of course! its a bit difficult task to develop a full fledged text editor !  , You are restricted to use Visual editor ! ( may be you are restricted to use the sophisticated tools such as MFC / Other supportive functions provided by Microsoft Visual C++  ) But your choice is to develop a text editor from a Text mode environment ( Turbo C/C++   will be the better choice to perform the task!)
 
1. You have to be familiar with all the functions of a real TEXT mode Text editor ( My advice is its better and easy to create a TEXT mode text editor than graphics mode text editor  , because graphics mode text editor is too complex to develop ) ,
2. The library functions given by Turbo C/C++   is not well suit for your work to be done  , so i recommend you to create your own functions to handle operations like screen handling ( includes , Menu handling  , key board event handling  , file handling and so on ..)
3. Use your own ideas to integrate all these components ( Functionally ) as a working tool .
4. Use trial and error ( will be the best ) method to de bug your program until it runs correct !

5. Its good to refer some real time codes to understand the problem so i wish to suggest you a good book on Projects using C .

Book name : Projects in C
Author : Yashavanth Kanethkar
Price : 300.
Publications : BPB

in that book you can get the complete code for a real text editor and also it explains all the concepts in developing a text editor please refer that !

All the best !
Regards !
Prince M. Premnath  

C

All Answers


Answers by Expert:


Ask Experts

Volunteer


Prince M. Premnath

Expertise


I'm sure that I can solve any doubts in Turbo C ,Graphics Programing ,Mouse, Hardware Programming ,File System ,Interrupts, BIOS handling , TSR Programming , General Concepts in C Language, handling inline Assembly statements

Experience

Research over 6+ Years

Organizations
CG-VAK Softwares and Exports Limited

Education/Credentials
Masters in Computer Applications

©2012 About.com, a part of The New York Times Company. All rights reserved.