trouble with notepad

Hello, i'm trying to make an address book program that stores data inside of a notepad document. The issue I am having is that it is unable to store multiple names inside the document is there a way to get multiple items on the document without the document clearing itself here is my current program:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <iostream>
#include <string>
#include <fstream>
using namespace std;

int main ()

{
    string name1;
    cout << "enter his/her adress: ";
    
    cin >> name1;

    
    fstream textfile;
    
    textfile.open("Adress.txt");
    
    textfile << name1;
    
    textfile.close();
    


}



if you know how to get this to work please tell me thanks,
Topic archived. No new replies allowed.