I am trying to read in an input from a user and I know my method needs a char* but is there anyway to make the input of cin able to be used by that char? (look at the comment at char* x.)
string y;
cout << "Enter your file: ";
cin >> y;
char * x = //here is where the string needs to go. If I type in the actual address it works, but I need it to work when the user just cin's the address//
string line,character_line;
ifstream myfile;
myfile.open (x);
while(getline(myfile,line))
{
if (line[0] != '0' && line[0] != '1')
{
character_line = line;
}
}