What I would like is when I input the file path in the console window (lets say C:\hello.txt), I would like it to create, open, then write text into the file. Here's an example of my code.
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main ()
{
string test;
cin >> test;
ofstream myfile;
myfile.open (test);
myfile << "Test\n";
myfile.close();
return 0;
}