Hey guys. I am somewhat new to the C++ language and was wanting to make a basic text editor. For this i was going to use Nodes and linked list to accomplish this. the main thing i need help with at this moment is creating a command prompt for the program, if anyone could give me some advice or an example code to go off of, that would be great.

Recommended Answers

All 7 Replies

what operating system and compiler do you have in mind? And do you want a command-line text editor, something like edlin.exe or a graphical program like Notepad.exe?

i am using windows and windows visual studios

You didn't answer the other question. If you use Windows Forms it will contain a control that acts like a simple text editor.

I want create my own command lines within the program using functions, so an example would be like, the user
types in 'a', which is a command to add a new line to a file.

Thanks, the actual help i need it creating that function within the program

In a loop get a single character then perform a switch on it to determine what command is to be executed. Or you can call fgets() to get an entire line from the keyboard and parse it. Just like any other program, just don't try to get too ambitious at first, keep it simple.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.