Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Linked List Pitanjce

[es] :: C/C++ programiranje :: C/C++ za početnike :: Linked List Pitanjce

[ Pregleda: 2686 | Odgovora: 2 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

Divjak
Vladimir Divjak
Student

Član broj: 4783
Poruke: 535
*.zrenjanin.beotel.net.



+1 Profil

icon Linked List Pitanjce29.04.2007. u 18:30 - pre 205 meseci
Kako u C-u postici ovako nesto
Code:

node->next->value //gde je node cvor povezane liste, a next pokazivac na sledeci cvor


Hvala!
And don't be mad at me for crying for humanity,
call it pretensions but I got good intentions,
to keep my sanity, I'm hoping, fuck, there's gotta be
an answer to their strategies and their evil inventions... ~Looptroop
 
Odgovor na temu

Milos Stojanovic
Belgrade

Član broj: 10343
Poruke: 1864
*.adsl.beotel.net.

ICQ: 282954730
Sajt: www.sietf.org


+7 Profil

icon Re: Linked List Pitanjce29.04.2007. u 19:53 - pre 205 meseci
Code:
typedef struct SNODE
{
    int value;
    struct SNODE* next;
} NODE;

...

    // i onda nesto tipa
    NODE* node;

    node = (NODE*)malloc(sizeof(NODE));
    node->next = (NODE*)malloc(sizeof(NODE));
    node->next->value = 1;

    // ...
    free(node->next);
    free(node);



[Ovu poruku je menjao Milos Stojanovic dana 29.04.2007. u 22:36 GMT+1]
ex. trooper
Oh goody... it's my Illudium PU-36 Explosive Space Modulator!
Softversko Inženjerstvo
♪♫♪
 
Odgovor na temu

Divjak
Vladimir Divjak
Student

Član broj: 4783
Poruke: 535
*.zrenjanin.beotel.net.



+1 Profil

icon Re: Linked List Pitanjce30.04.2007. u 10:56 - pre 205 meseci
Pa da upravo sam tako i pokusao, ali mi ne dozvoljava!
Pri pozivu node->next-value, kaze " dereferencing pointer to incomplete type ".
And don't be mad at me for crying for humanity,
call it pretensions but I got good intentions,
to keep my sanity, I'm hoping, fuck, there's gotta be
an answer to their strategies and their evil inventions... ~Looptroop
 
Odgovor na temu

[es] :: C/C++ programiranje :: C/C++ za početnike :: Linked List Pitanjce

[ Pregleda: 2686 | Odgovora: 2 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.