source: liacs/pm/backup/classetest.cc@ 6

Last change on this file since 6 was 2, checked in by Rick van der Zwet, 15 years ago

Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)

  • Property svn:executable set to *
File size: 545 bytes
Line 
1#include <iostream>
2
3const int n = 20;
4
5class VoorPascal {
6public:
7 VoorPascal( );
8 ~VoorPascal( ){cout << "dood"; }
9 void drukaf(int i);
10 void voegtoe(int i);
11 void erbij(int i);
12private:
13 bool inhoud[n];
14 int test;
15};
16
17VoorPascal::VoorPascal() {
18 int i;
19 test = 10;
20 for(i =0; i < n; i++) {
21 inhoud[i] = false;
22 }
23}
24
25void VoorPascal::drukaf(int i) {
26cout << inhoud[i] << endl << test <<endl;
27
28}
29
30void VoorPascal::erbij(int i) {
31 inhoud[i] = true;
32}
33
34int main() {
35VoorPascal rick;
36rick.erbij(2);
37rick.drukaf(2);
38cout << "programma einde";
39}
Note: See TracBrowser for help on using the repository browser.