trying to ifstream from a cin...
if (schc == "cal"){ system("cls"); string calus, calpa, calfi, calline; cout << "\t Type the DomainID.datc(ex: Youtube.datc) to get its credentials: \n"; cin >> calfi; ifstream calfic( calfi ); // problem is here ^^^^ if (!calfic){ cout << calfi << ' ' << "doesn't exist. \n"; refuse(); returntohome(); } for (int y = 0; getline(calfic, calline) && y < 2; y++){ switch(y){ case 1: cout << "Your username for " << calfi << " is : " << calline; break; case 2: cout << "Your password for " << calfi << " is : " << calline; break; cin.get(); returntohome(); } } i can't manage to read data using ifstream from a user-specified file with cin >>; Any suggestions? I'm kind of a newbie