All pastes #41422 Raw Edit

Unnamed

public text v1 · immutable
#41422 ·published 2006-02-13 13:37 UTC
rendered paste body
struct phonebook {
	char *username,*region;
	int code,time,used;
	struct phonebook *nxt;
};

int list_insert(const char *username[],const char *region[],const int time) {
    int a=1;
    struct phonebook *l,*ptr;
	l=find(*username);
	if (l!=NULL) {
	    printf("This name allready exists!\n");
	    return(0);
	}
	l=(struct phonebook *)malloc(sizeof(struct phonebook));
	if (l==NULL) {
	    printf("Memory Error!\n");
		return(0);
	}
	do {
	    ptr=find_code(a);
	    if (ptr==NULL) {
	        break;
	    }
        a++;
    }while (ptr!=NULL);
    l->username=username;  <------------EDW  assignment from incompatible pointer type
    l->region=region;      <-----------KAI EDW
    l->code=a;
    l->time=time;
    l->nxt=root;
    root=l;
    return(1);
}