b***y 发帖数: 2799 | 1 ☆─────────────────────────────────────☆
gebitan (job, job) 于 (Fri Sep 9 12:31:54 2005) 提到:
I am confusing what is the point to use static function here.
class Directory
{
string d_currentPath;
public:
static void preset(Directory &dir, char const *path);
};
void Directory::preset(Directory &dir, char const *newpath)
{
dir.d_currentPath = newpath; // ok
}
int main()
{
Directory dir;
|
|