In this case, string &filename
means the function will receive a reference (a memory address) as a parameter, instead of receiving it as a copy.
The advantage of this method is that your function will not allocate more space on the stack to save the data contained in filename.