:asd:
Visualizzazione Stampabile
Gli esami si avvicinano e Eclipse non vuole saperne di collaborare :mad:
Vediamo se Visual C compila.
ti capisco :sisi:
Ora compila :sisi: tutto a porno, avevo sbagliato a scrivere la struct :uhm:
Mi sono innamorato di questa canzone e anche del video :fag:
http://www.youtube.com/watch?v=<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/9Hol8Blss4E&hl=it&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/9Hol8Blss4E&hl=it&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>
http://answers.yahoo.com/question/in...6010348AAG8Moi
:rotfl: :rotfl: :rotfl:
chi l'ha scelta come "best answer" è un genio! :muaha:
:rotfl:
:asd:
btw, ho trovato un hotel libero a Hiroshima nei giorni che mi servono. Il problema? Solo camere doppie, ovvero letto matrimoniale :fag:
Portati un'amica :fag:
il problema e' solo l'inevitabile situazione imbarazzante alla reception :asd:
pero' c'e' anche internet free in ogni stanza... :uhm:
a me le geishe hanno sempre dato l'impressione di quelle donne che solo facendoti un massaggio ti fanno raggiungere il paradiso.
ma povero violent, ma quante gliene state tirando? :chebotta:
bohf, ho prenotato...tanto le cancellazioni si accettano fino a 3 giorni prima senza penale
mi sta' venendo la tentazione di inscenare una coppia gay :asd:
Codice:/*
* Pila.c
*
* Created on: 10-giu-2009
* Author: Lele
*/
#include <stdio.h>
#include "Pila.h"
int main(){
SPTR pila;
pila = create(10);
printf("Stack head: %d\n", head(pila));
pila = push(5,pila);
printf("Stack head: %d\n", pop(&pila));
printf("Stack head: %d\n", head(pila));
printf("Stack head: %d\n", pop(&pila));
printf("Stack head: %d\n", pop(&pila));
return 0;
}
Codice:/*
* Pila.h
*
* Created on: 10-giu-2009
* Author: Lele
*/
#include <stdlib.h>
typedef struct stack {
int elem;
struct stack *next;
} STACK, *SPTR;
SPTR create(int);
SPTR push(int, SPTR);
int pop(SPTR*);
int isEmpty(SPTR);
int head(SPTR);
SPTR create(int e){
SPTR temp = malloc(sizeof(STACK));
temp->elem = e;
temp->next = NULL;
return temp;
}
SPTR push(int e, SPTR p) {
SPTR temp = malloc(sizeof(STACK));
temp->elem = e;
temp->next = p;
return temp;
}
int pop(SPTR* p){
SPTR temp;
if(!isEmpty(*p)) {
int n = (*p)->elem;
temp = *p;
*p = (*p)->next;
free(temp);
return n;
}
return -1;
}
int isEmpty(SPTR p){
return (p == NULL) ? 1 : 0;
}
int head(SPTR p) {
return p->elem;
}
Codice:/*
* Coda.c
*
* Created on: 10-giu-2009
* Author: Lele
*/
#include <stdio.h>
#include "Coda.h"
int main(){
QPTR coda;
coda = create(10);
printf("Queue head: %d\n", head(coda));
coda = queue(5,coda);
coda = queue(3,coda);
printf("Queue head: %d\n", dequeue(&coda));
printf("Queue head: %d\n", head(coda));
printf("Queue head: %d\n", dequeue(&coda));
printf("Queue head: %d\n", dequeue(&coda));
return 0;
}
Quello che ho fatto oggi :cattivo: e mi mancano ancora gli alberi binari. Uccidetemi.Codice:/*
* Coda.h
*
* Created on: 10-giu-2009
* Author: Lele
*/
#include <stdlib.h>
typedef struct queue {
int elem;
struct queue *next;
} QUEUE, *QPTR;
QPTR create(int);
QPTR queue(int, QPTR);
int dequeue(QPTR*);
int isEmpty(QPTR);
int head(QPTR);
QPTR create(int e){
QPTR temp = malloc(sizeof(QUEUE));
temp->elem = e;
temp->next = NULL;
return temp;
}
QPTR queue(int e, QPTR p) {
QPTR temp1, temp2;
temp1 = malloc(sizeof(QUEUE));
temp1->elem = e;
temp1->next = NULL;
temp2 = p;
while(temp2->next != NULL) temp2 = temp2->next;
temp2->next = temp1;
return p;
}
int dequeue(QPTR* p){
QPTR temp;
if(!isEmpty(*p)) {
int n = (*p)->elem;
temp = *p;
*p = (*p)->next;
free(temp);
return n;
}
return -1;
}
int isEmpty(QPTR p){
return (p == NULL) ? 1 : 0;
}
int head(QPTR p) {
return p->elem;
}
sono matrimoniali perchè presumono che tu possa trovare un compagno di camera in giornata, naturalmente.
a Hiroshima, se :asd: