when i try to run this program i get a error message :
13 unknown type name 'node' i using codeblocks 13.12 in lubuntu 16.04.
note : i see no added settings in the compiler "all is uncheck" also im looking for a good IDE for lubuntu 16.04 .
#include <stdio.h>
struct node {
int data;
struct node* next;
};
struct node* head = NULL;
void insert()
{
if(head = NULL) {
node* temp = (node*)malloc(sizeof(struct node));
temp -> data = 2;
temp -> next = NULL;
head = temp;
}
void print() {
struct node* temp = head;
printf("list is: ");
while (temp != NULL) {
printf( "%d",temp->data);
temp = temp->next;
}
printf("\n");
}
int main () {
head = NULL;
printf("How Many Numbers?\n");
int a ,b ,c;
scanf("%d" , &b);
for(a = 0;i<b;a++) {
printf("Enter the number \n");
scanf("%d",&b);
Insert(b);
print();
return 0;
}