#include<iostream> #include<string> #include<fstream> using namespace std; int main(){ string file; cout <<"enter file name"; cin >> file; system(file); } is there an a way to open a txt file by using the user input. i only know for example system("code.txt"); but what if if it is user-defined. please help.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)