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