Saya baru belajar link list menggunakan bahasa c, dan membuat sebuah
program sederhana seperti dibawah ini, setelah dicompile pake gcc muncul
error "dereferencing pointer to incomplete type".
Kira2 apa penyebab terjadinya error tersebut???.
#include <stdio.h>
typedef struct
{
char nama[100];
char alamat[200];
struct s_notes *link;
} s_notes;
struct s_notes *notes,*tempnotes,*homenotes;
int main()
{
homenotes=NULL;
tempnotes=(struct s_notes *)malloc(sizeof(s_notes));
tempnotes->link=NULL; // Error berada pada baris ini
free(tempnotes);
}
--
Utk berhenti langganan, kirim email ke [EMAIL PROTECTED]
Informasi arsip di http://www.linux.or.id/milis.php3