Text Editor

Hey guys,
I've recently been developing a text editor(a very simple command line one.)
And my main problem is that the editor cannot input multiple lines. Here's a part of my code

1
2
3
4
5
6
7
8
9
10
11
12
getline(cin, text);
    cin.ignore( numeric_limits <streamsize> ::max(), '\n' );
    
    /*
    The only error is that the program cannot input multiple lines.
    */
    string key;
    key = _getch();
    cin >> key;
    if(key == "||done||"){
          cout << "Code Success.." << endl;
           }


The getline command also can take in all input till user presses enter.
So i was forced to use getch(). Now it can take in a maximum of 2 lines.
Can you suggest any alternative or any improvement in my code.
Constructive comments appreciated.

Crouchingtiger.
Topic archived. No new replies allowed.