What type is name? And the other name? What type is that? Are those meant to be two different things? How is the compiler going to know which one you mean?
It looks like your getline is causing the problem. The first parameter should be the name of the file, and the second parameter should be the name of the string that you want to insert the line into.
You are also sending the file into your setName function when you should probably be sending the string instead, make sure you don't call them the same thing.
It resolved part of the problem, but now i am getting an error message that says that the getline is supposed to have three arguments. Can someone tell me what the third is?
Thanks, but now that I put three arguments, it says it only expected 2. So I deleted the last one again, and it said it expected 3. If this is any help for finding my error here is a bigger chunk of my code: