Here is the structure declare code.
struct list_el {
int val;
struct list_el * next;
};
typedef struct list_el item;
And when I
typedef is not completely same as #define
Here is the difference by example:
#define cptr1 char*
typedef char* cptr2;
In code:
int main()
{
cptr1 c1,c2; // first case :
// here c1 will be pointer to char but c2 is only char as cptr
// is directly replaced by char* by preprocessor
cptr2 c3,c4; // second case :
// here c3 and c4 both are pointers to char
}