Einzelnen Beitrag anzeigen
Alt 13.03.2003, 15:05   #3
kikakater
Inventar
 
Registriert seit: 24.01.2001
Beiträge: 5.631


Standard

in C z.B :

Code:
struct s_oebb_bahnhof {
 struct s_oebb_bahnhof *pNaechste,*pVorherige;
 char ortschaft[40];
};

struct s_oebb_bahnhof global_1st_bahnhof;

global_1st_bahnhof.pVorherige= NULL;
global_1st_bahnhof.pNaechste= NULL;

...


/* 2. Haltestelle */
global_1st_bahnhof.pNaechste= malloc(sizeof(struct s_oebb_bahnhof));
global_1st_bahnhof.pNaechste->pVorherige= &global_1st_bahnhof;
global_1st_bahnhof.pNaechste->pNaechste= NULL;

...
kikakater ist offline   Mit Zitat antworten