I'm making a little notepad, and what I got is a single line input. Now I want it to be multiline. Basically, when the user presses the enter key, it should create a new line on the output too. It may sound vague, here is the source code:

Code:
#include <iostream>
#include <fstream>
using namespace std;

string text;
string e;

int write() {
cin >> text;
ofstream file ("text.txt", ios::app);
file << text << " ";
}

int main() {
      cout << "Text: ";
      write();
while (text != e) {
      write();
}
cin.get ();
return 0;
}
Can I let it recognise an input of the "enter" key?