/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs

« back to all changes in this revision

Viewing changes to Development/languages/C/Core/class/notes.txt

  • Committer: Suren A. Chilingaryan
  • Date: 2009-04-09 03:21:08 UTC
  • Revision ID: csa@dside.dyndns.org-20090409032108-w4edamdh4adrgdu3
import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
1. static data member
 
2
    �� member ���� �������� ������, ���������� ������ �����. ( a static data
 
3
    shared by all objects of the class )
 
4
    ����� ����� incomplete type � ������������ ��� ������. (���� ���!)
 
5
 
 
6
    ������������� ����������� ��������� ������:
 
7
        class {
 
8
            static const char* const RootDir;  
 
9
        }
 
10
        const char* const FepLoadBase::RootDir = "/var/www/crdlx5/data/";
 
11
        
 
12
2. ��������� ������
 
13
    * ��� �������� ��� ������
 
14
    * �� ���� ����� ���������� � ����������� ������ ������, ����� � 
 
15
    enumeratoram.
 
16
    * �������� enclose::inner::f()
 
17
    * class E { class In; }; class E::In{ ... };
 
18
    * �� ��������� ������� ����� ������������ ������ public ������ �����������
 
19
    ������.
 
20
    * ��������� ������ ����������� � C++ ������.
 
21
 
 
22
3. ������ ����� ��������� � ���� �������
 
23
 
 
24
4. ��������� �������: f("a") ������������ � ������� ��������, ������� ��
 
25
   ��������.
 
26
 
 
27
5. Note that postincrement (postfix ++) involves a temporary and preincrement 
 
28
   does not. For this reason, it is best to prefer ++p over p ++ for iterators.
 
29
 
 
30
6. In the case of overriding default allocators and other classes which are
 
31
   used in the STL, there is neccessity to provide A::A(A a) constructors.
 
32
   Otherwise, instead just a copy will be used (and destructor would be 
 
33
   executed twice on the same object). No errors or warnings are produced.
 
34
 
 
35
7. if member function defined with const specifier, this means it would
 
36
   not alter the object (this is constant)
 
37
        int memberfunc() const;