WhatMeWorry
2005.06.13, 01:53 PM
This worked fine in CodeWarrior, so Xcode must be more rigorous. This same
compiler error is happening in many, many places and after 2 hours I'm stumped.
error: statement cannot resolve address of overloaded function
Here's just one specific method, but I use the general pattern repeatedly:
void Unit::displayShipIdsInHanger( Unit *u )
{
ofstream outFile( "HangerPlanes.txt", ios::app );
outFile << u->name << endl;
outFile << "unitId " << u->unitId << endl;
outFile.close;
}
The error dohickey (red stop sign?) is at the outFile.close line. I'm stumped.
The documentation of ofstream class just shows one declaration of close
and it is something like void close(), so how in the hell could it be overloaded
even if I wanted it to be, which I don't?
Thanks in advance.
compiler error is happening in many, many places and after 2 hours I'm stumped.
error: statement cannot resolve address of overloaded function
Here's just one specific method, but I use the general pattern repeatedly:
void Unit::displayShipIdsInHanger( Unit *u )
{
ofstream outFile( "HangerPlanes.txt", ios::app );
outFile << u->name << endl;
outFile << "unitId " << u->unitId << endl;
outFile.close;
}
The error dohickey (red stop sign?) is at the outFile.close line. I'm stumped.
The documentation of ofstream class just shows one declaration of close
and it is something like void close(), so how in the hell could it be overloaded
even if I wanted it to be, which I don't?
Thanks in advance.