I made a simple notepad and was wondering if anyone knew how to let the user choose where the file is saved.
Here is my code.
Thank You.Code:#include <iostream> #include <string> #include <fstream> using namespace std; int main(){ string text; string name; string txt = ".txt"; ofstream test; char edit; cout<<"Enter some text\n"; getline(cin, text); cout<<"enter the file name\n"; getline(cin, name); string two = name + txt; test.open (two); test<< text; test.close(); system("pause"); }