what is different between this:
tElemPtr novyPrvok = (tElemPtr *)malloc(sizeof(tElemPtr));
and this:
tElemPtr novyPrvok = malloc(sizeof(tElemPtr));
I want to use it in InsertFirst function for inserting first element in the beginning of the List. Because, if I use without that pointer in front of malloc, Xcode tells me it is good, but I cant use "novyPrvok->data"
void InsertFirst (tList *L, int val) {
tElemPtr novyPrvok = (tElemPtr *)malloc(sizeof(tElemPtr));
if(novyPrvok == NULL)
Error();
novyPrvok->data = val;
novyPrvok->ptr = L->First;
L->First = novyPrvok;
}