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] Ingranaggi II Thread Rating: 1 votes, 5.00 average.
Pages (21): « First ... « 4 5 6 7 [8] 9 10 11 12 » ... Last »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
jamez-hetfield
.illuminato.

User info:
Registered: Apr 2007
Posts: 209 (0.03 al dì)
Location: Braone (BS)
Corso: Informatica
Anno: BOH!
Time Online: 21:42:29 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by khelidan Cosa intendi che ti darebbe errore?Non in compilazione di certo,potrebbe crasharti il programma


..esatto, intendevo crash..

12-07-2008 18:16
Click Here to See the Profile for jamez-hetfield Click here to Send jamez-hetfield a Private Message Find more posts by jamez-hetfield Add jamez-hetfield to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
khelidan
.grande:maestro.

User info:
Registered: Jun 2003
Posts: 1196 (0.15 al dì)
Location: Milano
Corso: Informatica
Anno: Finito....
Time Online: 13 Days, 12:08:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by jamez-hetfield
..dopo l'eliminazione tutto gira come prima..non varia nulla..
Ovviamente se il macchinario si divide in due devi gestirli separatamente dopo l'eliminazione..

Dunque uso una lista per le piastre e per ogni piastra una lista di adiacenze..


si ci ho ho pensato dopo

bho è strano perchè l'altezza c'è,prova a stampare gli altri dati della piastra

__________________
Khelidan

12-07-2008 18:18
Click Here to See the Profile for khelidan Click here to Send khelidan a Private Message Find more posts by khelidan Add khelidan to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
khelidan
.grande:maestro.

User info:
Registered: Jun 2003
Posts: 1196 (0.15 al dì)
Location: Milano
Corso: Informatica
Anno: Finito....
Time Online: 13 Days, 12:08:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ma il macchinario bisogna per forza stamparlo ordinato per nome?

__________________
Khelidan

13-07-2008 15:25
Click Here to See the Profile for khelidan Click here to Send khelidan a Private Message Find more posts by khelidan Add khelidan to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Sacratix
.illuminato.

User info:
Registered: Jun 2008
Posts: 154 (0.03 al dì)
Location: Lago d'Iseo - Bergamo
Corso: Informatica
Anno: 3
Time Online: 1 Day, 4:47:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

noooo, c'è scritto che non importa l'ordine

__________________
I wish for this night-time to last for a life-time

13-07-2008 16:42
Click Here to See the Profile for Sacratix Click here to Send Sacratix a Private Message Find more posts by Sacratix Add Sacratix to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Sacratix
.illuminato.

User info:
Registered: Jun 2008
Posts: 154 (0.03 al dì)
Location: Lago d'Iseo - Bergamo
Corso: Informatica
Anno: 3
Time Online: 1 Day, 4:47:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

piuttosto
mi succede una cosa stranissima...

inserisco tre piastre (a piramide)
alfa e beta, separate
gamma sovrapposte alle due di prima

se elimino gamma tutto bene,

elimino beta,

stampa gamma
mi dice che è da sola

stampa alfa
mi dice che c'è anche gamma

ristampo gamma
adesso mi dice che c'è anche alfa

-------------------------------------------------
eppure la stampa non mi modifica niente delle adiacenze
il mio codice è vivo!

__________________
I wish for this night-time to last for a life-time

13-07-2008 16:43
Click Here to See the Profile for Sacratix Click here to Send Sacratix a Private Message Find more posts by Sacratix Add Sacratix to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
khelidan
.grande:maestro.

User info:
Registered: Jun 2003
Posts: 1196 (0.15 al dì)
Location: Milano
Corso: Informatica
Anno: Finito....
Time Online: 13 Days, 12:08:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Sacratix
noooo, c'è scritto che non importa l'ordine


ah ok,per fortuna.....

-----

se mi dai le coordinate del tuo esempio provo con il mio progetto


piuttosto te come ha fatto nell'elimina a capire se il secondo parametro è una stringa,il nome della piastra oppure un intero,l'altezza della piastra?

__________________
Khelidan

13-07-2008 16:53
Click Here to See the Profile for khelidan Click here to Send khelidan a Private Message Find more posts by khelidan Add khelidan to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
jamez-hetfield
.illuminato.

User info:
Registered: Apr 2007
Posts: 209 (0.03 al dì)
Location: Braone (BS)
Corso: Informatica
Anno: BOH!
Time Online: 21:42:29 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Raga sono in crisi..

..alla riga 19 dell'input di esempio "m zeta" come output ricevo:
(
zeta 0
epsilon 0
beta 0
(null) 0
)
..e al comando successivo va tutto in crash..

Non riesco a capire che cazzo succede..

Sono due giorni che rileggo da capo il codice, pensavo fosse un problema di aggiornamento delle adiacenze in seguito all'eliminazione di delta (riga 18 di input) ma sembra esser tutto perfetto..
Questo (null) non è nemmeno una pseudopiastra perchè se stampo gli altri suoi campi mi da tutto a zero (anche inizializzando le variabili nell'inserimento piastra a valori diversi)..da dove cazzo uscirà?!

Il problema è che non riesco nemmeno a riprodurlo!

13-07-2008 17:11
Click Here to See the Profile for jamez-hetfield Click here to Send jamez-hetfield a Private Message Find more posts by jamez-hetfield Add jamez-hetfield to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
jamez-hetfield
.illuminato.

User info:
Registered: Apr 2007
Posts: 209 (0.03 al dì)
Location: Braone (BS)
Corso: Informatica
Anno: BOH!
Time Online: 21:42:29 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by khelidan
piuttosto te come ha fatto nell'elimina a capire se il secondo parametro è una stringa,il nome della piastra oppure un intero,l'altezza della piastra?


..io ho semplicemente ricavato con un if se il primo elemento della strina è un numero (nelle specifiche il primo carattere di una piastra è per forza una lettera) e nel caso faccio il parsing da string a int con la funzione int atoi(string)..
..non sarà prestazionalmente ottimo ma x lo meno funziona..

13-07-2008 17:15
Click Here to See the Profile for jamez-hetfield Click here to Send jamez-hetfield a Private Message Find more posts by jamez-hetfield Add jamez-hetfield to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
khelidan
.grande:maestro.

User info:
Registered: Jun 2003
Posts: 1196 (0.15 al dì)
Location: Milano
Corso: Informatica
Anno: Finito....
Time Online: 13 Days, 12:08:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by jamez-hetfield
..io ho semplicemente ricavato con un if se il primo elemento della strina è un numero (nelle specifiche il primo carattere di una piastra è per forza una lettera) e nel caso faccio il parsing da string a int con la funzione int atoi(string)..
..non sarà prestazionalmente ottimo ma x lo meno funziona..


ma come fai a capire se il primo valore è un numero o un char?

P.s: per il tuo problema,sei proprio sicuro che quel null non sia qualcosa che ha a che fare con delta e con la sua eliminazione?Hai provato a fare altri esempi di input simili?

__________________
Khelidan

13-07-2008 17:23
Click Here to See the Profile for khelidan Click here to Send khelidan a Private Message Find more posts by khelidan Add khelidan to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Sacratix
.illuminato.

User info:
Registered: Jun 2008
Posts: 154 (0.03 al dì)
Location: Lago d'Iseo - Bergamo
Corso: Informatica
Anno: 3
Time Online: 1 Day, 4:47:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

nome[0] >= '0' && nome[0]<= '9'

--------------------------------------

l'esempio è

p 0 0 10 10 alfa
p 20 0 30 10 beta
p 5 0 25 10 gamma

e beta //o alfa tanto il risultato è lo stesso
m gamma
m alfa
m gamma

------------------------------------

nuovo problema,
quando elimino le liste
invece di mi trovo il campo nome = "" e l'eliminazione continua finchè non si pianta...

__________________
I wish for this night-time to last for a life-time

13-07-2008 17:26
Click Here to See the Profile for Sacratix Click here to Send Sacratix a Private Message Find more posts by Sacratix Add Sacratix to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Sacratix
.illuminato.

User info:
Registered: Jun 2008
Posts: 154 (0.03 al dì)
Location: Lago d'Iseo - Bergamo
Corso: Informatica
Anno: 3
Time Online: 1 Day, 4:47:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by jamez-hetfield
..non sarà prestazionalmente ottimo ma x lo meno funziona..


...è l'unico modo

__________________
I wish for this night-time to last for a life-time

13-07-2008 17:30
Click Here to See the Profile for Sacratix Click here to Send Sacratix a Private Message Find more posts by Sacratix Add Sacratix to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
jamez-hetfield
.illuminato.

User info:
Registered: Apr 2007
Posts: 209 (0.03 al dì)
Location: Braone (BS)
Corso: Informatica
Anno: BOH!
Time Online: 21:42:29 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by khelidan
ma come fai a capire se il primo valore è un numero o un char?

P.s: per il tuo problema,sei proprio sicuro che quel null non sia qualcosa che ha a che fare con delta e con la sua eliminazione?Hai provato a fare altri esempi di input simili?


Allora, se te hai per esempio..

char *nome;
nome = //recuperi la stringa che segue il comando "e"

if((nome[0] == '0')||(nome[0] == '1')||(nome[0] == '2')|| ecc..)
int num = atoi(nome);

..è tutto il giorno che provo, non riesco ad isolare il caso..

13-07-2008 17:42
Click Here to See the Profile for jamez-hetfield Click here to Send jamez-hetfield a Private Message Find more posts by jamez-hetfield Add jamez-hetfield to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
jamez-hetfield
.illuminato.

User info:
Registered: Apr 2007
Posts: 209 (0.03 al dì)
Location: Braone (BS)
Corso: Informatica
Anno: BOH!
Time Online: 21:42:29 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Sacratix
...è l'unico modo


Meglio! :D

13-07-2008 17:44
Click Here to See the Profile for jamez-hetfield Click here to Send jamez-hetfield a Private Message Find more posts by jamez-hetfield Add jamez-hetfield to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
khelidan
.grande:maestro.

User info:
Registered: Jun 2003
Posts: 1196 (0.15 al dì)
Location: Milano
Corso: Informatica
Anno: Finito....
Time Online: 13 Days, 12:08:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

a me l'esempio di Sacratiz mi ha fatto trovare un problema nell'elimina tra l'altro

__________________
Khelidan

13-07-2008 18:02
Click Here to See the Profile for khelidan Click here to Send khelidan a Private Message Find more posts by khelidan Add khelidan to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
jamez-hetfield
.illuminato.

User info:
Registered: Apr 2007
Posts: 209 (0.03 al dì)
Location: Braone (BS)
Corso: Informatica
Anno: BOH!
Time Online: 21:42:29 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

..a me quell'esempio nn da problemi..

13-07-2008 18:17
Click Here to See the Profile for jamez-hetfield Click here to Send jamez-hetfield a Private Message Find more posts by jamez-hetfield Add jamez-hetfield to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 15:05.    Post New Thread    Post A Reply
Pages (21): « First ... « 4 5 6 7 [8] 9 10 11 12 » ... Last »   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.053 seconds (68.97% PHP - 31.03% MySQL) con 26 query.