I want to be able to take text input and store it in a string variable like so:
#include <fstream>
int main()
{
string fileInput = "filetoinput.txt";
ifstream inputFile (fileInput);
}
But it will only accept creating an ifstream type variable like so:
#include <fstream>
int main()
{
ifstream inputFile ("filetoinput.txt");
}
Is there a way to make a string variable act like text in quotes?