File: public.yo

package info (click to toggle)
c%2B%2B-annotations 13.02.02-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,576 kB
  • sloc: cpp: 25,297; makefile: 1,523; ansic: 165; sh: 126; perl: 90; fortran: 27
file content (13 lines) | stat: -rw-r--r-- 630 bytes parent folder | download | duplicates (4)
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.