Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi A - F > Algoritmi e strutture dati > Progetto "FACCIALIBRO"
Pages (28): « First ... « 24 25 26 27 [28]   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
Bloom
.illuminato.

User info:
Registered: May 2006
Posts: 229 (0.03 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 3:14:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Gcc ha il suo debug,prova quello

07-03-2009 12:02
Click Here to See the Profile for Bloom Click here to Send Bloom a Private Message Find more posts by Bloom Add Bloom to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Joliet Jake
.illuminato.

User info:
Registered: Oct 2006
Posts: 249 (0.04 al dì)
Location: Milano
Corso: Informatica triennale
Anno: 3
Time Online: 1 Day, 4:31:25 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

code:
void inorder(rbtreep *p, void (*op)(rbnodep *))


scusate ma qualcuno riesce a spiegarmi cosa srajfiljdklf vuol dire?
il secondo parametro cos'è?
un puntatore ad una funzione?
una funzione?

sono scemo, scrivetemi perfavore come deve essere il comando
code:
inorder (albero, ????)

__________________
In Blues We Trust

Last edited by Joliet Jake on 08-03-2009 at 17:34

08-03-2009 17:10
Click Here to See the Profile for Joliet Jake Click here to Send Joliet Jake a Private Message Visit Joliet Jake's homepage! Find more posts by Joliet Jake Add Joliet Jake to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Shaper
.consigliere.

User info:
Registered: Sep 2007
Posts: 147 (0.02 al dì)
Location: Milano
Corso: Informatica
Anno: Secondo anno
Time Online: 1 Day, 11:23:27 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Joliet Jake
code:
void inorder(rbtreep *p, void (*op)(rbnodep *))


scusate ma qualcuno riesce a spiegarmi cosa srajfiljdklf vuol dire?
il secondo parametro cos'è?
un puntatore a duna funzione?
una funzione?

sono scemo, scrivetemi perfavore come deve essere il comando
code:
inorder (albero, ????)


il secondo parametro è un puntatore a una funzione, la quale accetta un parametro di tipo puntatore a rbnodep.
Serve per far eseguire una qualsiasi funzione con quel prototipo su ognuno dei nodi visitati mediante inorder

__________________
Eidolon64|Blog

08-03-2009 17:13
Click Here to See the Profile for Shaper Click here to Send Shaper a Private Message Visit Shaper's homepage! Find more posts by Shaper Add Shaper to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
hyperion
.illuminato.

User info:
Registered: Oct 2007
Posts: 171 (0.03 al dì)
Location:
Corso: Informatica
Anno:
Time Online: 3 Days, 12:37:41 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Joliet Jake
code:
void inorder(rbtreep *p, void (*op)(rbnodep *))


scusate ma qualcuno riesce a spiegarmi cosa srajfiljdklf vuol dire?
il secondo parametro cos'è?
un puntatore a duna funzione?
una funzione?

sono scemo, scrivetemi perfavore come deve essere il comando
code:
inorder (albero, ????)



puoi riutilizzare quella funzione per qualsiasi funzione che abbia bisogno di una visita inordine su di un albero...ad esempio per fare una stampa o qualche altra operazione invece di scrivere due funzioni inorder differenti usi la stessa con un puntatore generico (void)...

08-03-2009 17:13
Click Here to See the Profile for hyperion Click here to Send hyperion a Private Message Find more posts by hyperion Add hyperion to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Joliet Jake
.illuminato.

User info:
Registered: Oct 2006
Posts: 249 (0.04 al dì)
Location: Milano
Corso: Informatica triennale
Anno: 3
Time Online: 1 Day, 4:31:25 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ok grazie..
un altra cosa IMPORTANTISSIMA

ma scusate se un nodo viene creato ed inserito CON una chiave ed IN BASE alla chiave che è un intero.. ed io non voglio che sia un intero il nucleo fondamentale del nodo perchè nel mio caso invece è un profilo o un gruppo, allora sono davanti ad un dilemma


  • o cambio il tipo di dato di "key"in un tipo che mi va bene come il nome del gruppo o del profilo.. ma poi il confronti come li posso fare? nel senso che se il programma si aspetta un valore numerico io non psoso passargli mia nonna.. andrebbe bene il confronto fra stringhe sfruttando i lcodice ascii? o c'è qualcosa che mi sfugge?

  • oppure lascio la key numerica ma a quel punto diventa tutto inutile dato che non so che connessione introdurre fra il profilo (o il gruppo) e la key


Sarà che è giorni che ci lavoro sopra ma sto sbarellando.. aiuto!

graize per l'aiuto.. davvero non vorrie disturbarvi ma ci tengo a farcela..

__________________
In Blues We Trust

Last edited by Joliet Jake on 08-03-2009 at 17:39

08-03-2009 17:37
Click Here to See the Profile for Joliet Jake Click here to Send Joliet Jake a Private Message Visit Joliet Jake's homepage! Find more posts by Joliet Jake Add Joliet Jake to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Bloom
.illuminato.

User info:
Registered: May 2006
Posts: 229 (0.03 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 3:14:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

il profilo è un puntatore a char ,i confronti li puoi fare tutti con strcmp

08-03-2009 18:04
Click Here to See the Profile for Bloom Click here to Send Bloom a Private Message Find more posts by Bloom Add Bloom to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Joliet Jake
.illuminato.

User info:
Registered: Oct 2006
Posts: 249 (0.04 al dì)
Location: Milano
Corso: Informatica triennale
Anno: 3
Time Online: 1 Day, 4:31:25 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

appunto, ok menomale :)
per l'inorder quindi basta una cosa del genere

code:
void printnames(nodep* tizio) { bla bla }


code:
inorder (root, printnames)

?

__________________
In Blues We Trust

08-03-2009 18:13
Click Here to See the Profile for Joliet Jake Click here to Send Joliet Jake a Private Message Visit Joliet Jake's homepage! Find more posts by Joliet Jake Add Joliet Jake to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Shaper
.consigliere.

User info:
Registered: Sep 2007
Posts: 147 (0.02 al dì)
Location: Milano
Corso: Informatica
Anno: Secondo anno
Time Online: 1 Day, 11:23:27 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Joliet Jake
appunto, ok menomale :)
per l'inorder quindi basta una cosa del genere

code:
void printnames(nodep* tizio) { bla bla }


code:
inorder (root, printnames)

?


Sì, però di solito all'inorder si passa l'albero, non un nodo...

__________________
Eidolon64|Blog

08-03-2009 18:15
Click Here to See the Profile for Shaper Click here to Send Shaper a Private Message Visit Shaper's homepage! Find more posts by Shaper Add Shaper to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Bloom
.illuminato.

User info:
Registered: May 2006
Posts: 229 (0.03 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 3:14:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

puoi fare anche cosi...
void inorder(nodep *r, nodep *nil){
if(r!=nil){
inorder(r->left,nil);
printf("%s\n",r->nomeprofilo);
inorder(r->right,nil);
}

}

poi per chiamarla correttamente fai inorder(tree->root,tree->nil);
cosi sei sicuro che ti scandisce tutto l'albero

08-03-2009 18:18
Click Here to See the Profile for Bloom Click here to Send Bloom a Private Message Find more posts by Bloom Add Bloom to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
juggernaut
.amico.

User info:
Registered: Feb 2009
Posts: 32 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 15:55:27 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

dopo quanto sapremo se abbiamo passato il progetto??

08-03-2009 18:28
Click Here to See the Profile for juggernaut Click here to Send juggernaut a Private Message Find more posts by juggernaut Add juggernaut to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Bloom
.illuminato.

User info:
Registered: May 2006
Posts: 229 (0.03 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 3:14:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

non lo so.......spero che ci diano tempo di ripassare

08-03-2009 18:29
Click Here to See the Profile for Bloom Click here to Send Bloom a Private Message Find more posts by Bloom Add Bloom to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Joliet Jake
.illuminato.

User info:
Registered: Oct 2006
Posts: 249 (0.04 al dì)
Location: Milano
Corso: Informatica triennale
Anno: 3
Time Online: 1 Day, 4:31:25 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Shaper
Sì, però di solito all'inorder si passa l'albero, non un nodo...


si lo so, root è un nome a caso, ma indica l'albero, tranquillo ;)

__________________
In Blues We Trust

08-03-2009 18:42
Click Here to See the Profile for Joliet Jake Click here to Send Joliet Jake a Private Message Visit Joliet Jake's homepage! Find more posts by Joliet Jake Add Joliet Jake to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 16:15.    Post New Thread    Post A Reply
Pages (28): « First ... « 24 25 26 27 [28]   Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.160 seconds (60.22% PHP - 39.78% MySQL) con 24 query.