but when i put this line in the header file, i get the following errors:
error: variable or field 'read' declared void
error: 'set' was not declared in this scope
error: 'string' was not declared in this scope
error: 'mySet' was not declared in this scope
Nothing is wrong with that prototype so long as <set> and <string> are both included before that line header.
The only thing I can think of is you put the prototype somewhere inappropriate, or you have some other unrelated error that's confusing the compiler.
Or you're calling the function wrong.
Is the pasted line the one that actually is producing the error? I find that a little unlikely. If it isn't, can you paste the line that actually is giving you the error?