title image


Smiley Re: Listenprogramm
Hi



Grob so:



List* xs = new Cons("friends",

new Cons("romans",

new Cons("countrymen",

new Empty()))));



List *current;;

cout << "Listen\n" << endl;



// Fange mit xs an: current = xs

// Wiederhole, solange gilt: !current->isEmpty()

// Mache nach jedem Durchlauf: current = current->tail()

for (current = xs; !current->isEmpty(); current = current->tail())

{

cout << xs->head() << endl;

}





bye





geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: