cpptests/miniclass.cpp
raw| 1 | |
| 2 | class foo { |
| 3 | public: |
| 4 | int public_field; |
| 5 | int public_func(); |
| 6 | private: |
| 7 | int private_field; |
| 8 | int private_func(); |
| 9 | protected: |
| 10 | int protected_field; |
| 11 | int protected_func(); |
| 12 | }; |
| 13 | |
| 14 | int main () { |
| 15 | |
| 16 | class foo { |
| 17 | public: |
| 18 | int public_field; |
| 19 | int public_func(); |
| 20 | private: |
| 21 | int private_field; |
| 22 | int private_func(); |
| 23 | protected: |
| 24 | int protected_field; |
| 25 | int protected_func(); |
| 26 | }; |
| 27 | |
| 28 | } |