152k views
1 vote
If the name of the input file was in a variable named filename, which of the following is the correct way to open the input stream named inFile and associate it with this file?

a. inFile.open (filename);
b. inFile = filename;
c. inFile = "filename";
d. inFile.open ("filename");

1 Answer

2 votes
It would be A - inFile.open(filename)
User Andrae
by
3.4k points