Last change
on this file since 5 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:
720 bytes
|
Rev | Line | |
---|
[2] | 1 | #include <iostream>
|
---|
| 2 | #include <ctime>
|
---|
| 3 | using namespace std;
|
---|
| 4 |
|
---|
| 5 | long randi(){
|
---|
| 6 | static int
|
---|
| 7 |
|
---|
| 8 | }
|
---|
| 9 |
|
---|
| 10 | long randomgetal(long *OudGetal) {
|
---|
| 11 | const int a = 221;
|
---|
| 12 | const int c = 1;
|
---|
| 13 | const int m = 1000;
|
---|
| 14 | *OudGetal = (time (NULL) % m) + *OudGetal;
|
---|
| 15 | *OudGetal = ( a * *OudGetal + c ) % m;
|
---|
| 16 | return(*OudGetal);
|
---|
| 17 | }
|
---|
| 18 |
|
---|
| 19 | class listvak {
|
---|
| 20 | public:
|
---|
| 21 | int getal;
|
---|
| 22 | listvak * vak_pt;
|
---|
| 23 |
|
---|
| 24 | void random();
|
---|
| 25 | void destroy();
|
---|
| 26 | void bubblesort();
|
---|
| 27 | void merge(listvak * Lx_pt, listvak * Ly_pt);
|
---|
| 28 | };
|
---|
| 29 |
|
---|
| 30 |
|
---|
| 31 |
|
---|
| 32 | int main() {
|
---|
| 33 | listvak * L1;
|
---|
| 34 | listvak * L2;
|
---|
| 35 | listvak * L3;
|
---|
| 36 | L1 = new listvak;
|
---|
| 37 | L2 = new listvak;
|
---|
| 38 | L3 = new listvak;
|
---|
| 39 |
|
---|
| 40 | L1->vak_pt = new listvak;
|
---|
| 41 | L1->vak_pt->getal = 40;
|
---|
| 42 |
|
---|
| 43 | listvak * Ltest = L1->vak_pt;
|
---|
| 44 | cout << Ltest->getal;
|
---|
| 45 |
|
---|
| 46 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.