source: liacs/pm/sorteren.cc@ 340

Last change on this file since 340 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
Line 
1#include <iostream>
2#include <ctime>
3using namespace std;
4
5long randi(){
6 static int
7
8}
9
10long 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
19class 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
32int 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.