syntax question

Could someone tell me the right way to say this? openfile() returns a pointer to a file.

File *output = openFile(fileName);
while (output.available()){
// blah, blah

    while (output->available()){

Thanks Nick.

Does openFile() really return a pointer, though? Lets see your real code.

It's just a wrapper for SD.open()

File *openFile(char *fileName, int mode=FILE_READ){
DEBUG_PRINT("exists " << fileName << "\t" << SD.exists(fileName));
if (!SD.exists(fileName)){
crash (4001, "\nFile not found\n" );
}
File rslt = SD.open(fileName);
DEBUG_PRINT("file:" << rslt);

if (!rslt){
crash (4000, "\nFile will not open\n" );
}
return(&rslt);
}