In my program written in C++, I open a file as follows:

```
std::ifstream file("testfile.txt");

```

This usage can handle the scenario where the input file has a fixed name of "testfile.txt".
I would like to know how to allow the user to input a file name, e.g., "userA.txt", and the program automatically opens this file, "userA.txt".