Search
 
 
  Engleski
 
 
 
Open in this window (click to change)
Forum@DeGiorgi: Početna
Forum za podršku nastavi na PMF-MO
Login Registracija FAQ Smajlići Članstvo Pretražnik Forum@DeGiorgi: Početna

problemcic
WWW:

Moja sarma
 
Započnite novu temu   Odgovorite na temu   printer-friendly view    Forum@DeGiorgi: Početna -> Kolegiji 1. godine, preddiplomski studij Matematika -> Programiranje 1 i 2
Prethodna tema :: Sljedeća tema  
Autor/ica Poruka
defar
Forumaš(ica)
Forumaš(ica)


Pridružen/a: 19. 01. 2004. (01:37:19)
Postovi: (152)16
Sarma = la pohva - posuda
= 5 - 0

PostPostano: 22:34 uto, 13. 4. 2004    Naslov: problemcic Citirajte i odgovorite

daklem, situacija je sljedeca:

[code:1]typedef struct node *point;
typedef struct nodeS{
point *child;
int *lab;
}node;

(...)

void rekurzy(point tree, int level, int *arr){
int i=0;
int check=1;
point *childn=(*tree).child; //--------------------------> greska 1. (i kljucna)
while(k-1-i){
if(!(childn[i]=make_node(level,arr))) check--;
i++;
}
if(!check){
error;
exit(1);
};
i=0;
while(k-1-i){
rekurzy(childn[i], level+1, arr); //----------------------> greska 2.
i++;
}
}[/code:1]


gcc se tocno zali na sljedece:
greska 1. - dereferencing pointer to incomplete type
greska 2. - warning (asignment from incompatibel pointer type)

eh, sad, ja nikako da vidim sto tocno njega smeta, jedva da uopce VIDIM, pa lijepo umoljavam neku iskusniju dusu da baci pogled i skrati mi muke.
hvalja! :D[b][/b]
daklem, situacija je sljedeca:

Kod:
typedef struct node *point;
typedef struct nodeS{
        point *child;
        int *lab;
}node;

(...)

void rekurzy(point tree, int level, int *arr){
        int i=0;
        int check=1;
        point *childn=(*tree).child;                   //--------------------------> greska 1. (i kljucna)
        while(k-1-i){
                if(!(childn[i]=make_node(level,arr))) check--;
                         i++;
        }
        if(!check){
   error;
   exit(1);
        };
        i=0;
        while(k-1-i){
                rekurzy(childn[i], level+1, arr);     //----------------------> greska 2.
                i++;       
        }
}



gcc se tocno zali na sljedece:
greska 1. - dereferencing pointer to incomplete type
greska 2. - warning (asignment from incompatibel pointer type)

eh, sad, ja nikako da vidim sto tocno njega smeta, jedva da uopce VIDIM, pa lijepo umoljavam neku iskusniju dusu da baci pogled i skrati mi muke.
hvalja! Very Happy



_________________
`To begin with, a dog's not mad. You grant that? 'Well, then,' the Cat went on, `you see, a dog growls when it's angry, and wags its tail when it's pleased. Now I growl when I'm pleased, and wag my tail when I'm angry. Therefore I'm mad.'
[Vrh]
Korisnički profil Pošaljite privatnu poruku
GauSs_
Moderator
Moderator


Pridružen/a: 28. 01. 2004. (21:01:17)
Postovi: (53C)16
Spol: muško
Sarma = la pohva - posuda
72 = 110 - 38
Lokacija: 231

PostPostano: 8:56 sri, 14. 4. 2004    Naslov: Re: problemcic Citirajte i odgovorite

[quote="defar"]
point *childn=(*tree).child; //--------------------------> greska 1.

rekurzy(childn[i], level+1, arr); //----------------------> greska 2.
[/quote]

Medjutim, kako nisi napisala kompletan kod ne znam sto je tree? ajde napisi sto ti je tree
defar (napisa):

point *childn=(*tree).child; //--------------------------> greska 1.

rekurzy(childn[i], level+1, arr); //----------------------> greska 2.


Medjutim, kako nisi napisala kompletan kod ne znam sto je tree? ajde napisi sto ti je tree


[Vrh]
Korisnički profil Pošaljite privatnu poruku Posjetite Web stranice
defar
Forumaš(ica)
Forumaš(ica)


Pridružen/a: 19. 01. 2004. (01:37:19)
Postovi: (152)16
Sarma = la pohva - posuda
= 5 - 0

PostPostano: 10:01 sri, 14. 4. 2004    Naslov: Citirajte i odgovorite

ah, da,
point tree;
iliti
node *tree;

senor Gauss :D
ah, da,
point tree;
iliti
node *tree;

senor Gauss Very Happy



_________________
`To begin with, a dog's not mad. You grant that? 'Well, then,' the Cat went on, `you see, a dog growls when it's angry, and wags its tail when it's pleased. Now I growl when I'm pleased, and wag my tail when I'm angry. Therefore I'm mad.'
[Vrh]
Korisnički profil Pošaljite privatnu poruku
Prethodni postovi:   
Započnite novu temu   Odgovorite na temu   printer-friendly view    Forum@DeGiorgi: Početna -> Kolegiji 1. godine, preddiplomski studij Matematika -> Programiranje 1 i 2 Vremenska zona: GMT + 01:00.
Stranica 1 / 1.

 
Forum(o)Bir:  
Ne možete otvarati nove teme.
Ne možete odgovarati na postove.
Ne možete uređivati Vaše postove.
Ne možete izbrisati Vaše postove.
Ne možete glasovati u anketama.
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2002 phpBB Group
Theme created by Vjacheslav Trushkin
HR (Cro) by Ančica Sečan