How do I create a new file based on the command line.
For example if my argv[1] is file.extension I want to create a new text file named file.txt.
I tried this:
ofstream a;
a.open("argv[1].txt");
But it very obviously creates a file called argv[1].txt instead of file.txt