🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.c
Article #562

Re: stos

#562
From: Marcin Olszewski
Date: Mon, 05 Jan 1998 12:39
34 lines
1827 bytes
Hubert Iwaniuk wrote:
> 
> - Czy ktos moze mi podpowiedziec jak to zrobic?
> - Co?
> - A cos takiego:
>         typedef Typ int;
>         struc shead
>                 {
>                 Typ pole_danej; /*pole do umieszczania danych*/
>                 shead *previous; /*wskaznik do poprzedniej struktury
>                                                         shead*/
>                 };
>         class stos
>                 {
>                 private:
>                         shead head;
>                 public:
>                         Stos( void );
>                         Stos( const stos );
>                         get( void );
>                         put( Typ );
>                         isvoid( void );
>                 };
> 
> Tak mniejwiecej ma to wygladac.
> Problem polega na tym jak dodajac nowy elemen stworzyc head tak by
> wskazywal do poprzedniego ( czyli poprzedniego head - jedno i to samo pole
> tej klasy );
> Jesli wiesz jak to zrobic napisz prosze.
> 
>                                 Hubert Iwaniuk
Proponowalbym shead* head zamiast shead head, oraz get i put z
odpowiednimi new/delete.
Maly.
Technical Details
Message-ID: <34B0D480.398B222B@ibm.uci.agh.edu.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!news.icm.edu.pl!uucp-gw.cyf.gov.pl!news.wnaft.agh.edu.pl!agh.edu.pl!not-for-mail
References: <Pine.OSF.3.95.980105124427.17203B-100000@venus.wmid.amu.edu.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!news.icm.edu.pl!uucp-gw.cyf.gov.pl!news.wnaft.agh.edu.pl!agh.edu.pl!not-for-mail
From: Marcin Olszewski <olszewsk@ibm.uci.agh.edu.pl>
Newsgroups: pl.comp.lang.c
Subject: Re: stos
Date: Mon, 05 Jan 1998 13:39:28 +0100
Organization: UCI AGH - laboratorium studenckie
Lines: 34
Message-ID: <34B0D480.398B222B@ibm.uci.agh.edu.pl>
References: <Pine.OSF.3.95.980105124427.17203B-100000@venus.wmid.amu.edu.pl>
NNTP-Posting-Host: mops4.uci.agh.edu.pl
Mime-Version: 1.0
X-Mailer: Mozilla 3.01Gold (X11; I; Linux 2.0.27 i586)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit