1 2 3 4 5 6 7 8 9 10 11 12 13
|
Data members could also be declared in the i(public) section of a class. This,
however, is deprecated (as it violates the principle of i(data hiding)). The
static data member tt(s_path[]) (cf. section ref(StaticData)) could be
declared in the public section of the class definition. This would allow all
the program's code to access this variable directly:
verb( int main()
{
getcwd(Directory::s_path, 199);
})
A declaration is not a definition. Consequently the variable tt(s_path)
still has to be defined. This implies that some source file still needs to
contain tt(s_path[]) array's definition.
|