how to Write a program for a mini editor which allows the the following operations: Insert lines, delete lines, edit lines (adding words, removing words). Each line can accommodate 80 characters. If a line exceeds 80 characters, then you need to move words in that line to next line such that both lines are having a maximum of 80 characters.
My advice , is use the qt framework which is best linux c++ gui programming interface.
And if you want help , you can post your error code here and I can solve if i can and than i will post here.
Are you expected to implement your editor with raw C++, without the STL. Or is it OK to use the STL?
Are you using a particular GUI framework? Or is this a basic little command line editor, like the old DOS edlin? (The description does sound a bit like edlin.)
Without knowing what you've learnt so far, your question is a bit too open.
only with c/c++
editor requirement shown below
Insert lines, delete lines, edit lines (adding words, removing words). Each line can accommodate 80 characters. If a line exceeds 80 characters, then you need to move words in that line to next line such that both lines are having a maximum of 80 characters
Sorry! The description is quite vague (to me), and as I know nothing much about you experience, there is not a lot I can add.
If I was forced to guess, you're talking about a command line editor that stores a set of strings (one per line) and is controlled by a set of commands. But when you say just C++, I'm still left wondering whether you're allowed to use STL (or do you have to use a char array?). Does the text have to be displayed all the time, or can you just use a command to display the text when needed.
As it's a programming exercise, it would very prob quicker for you to seek clairification from your professor.