Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cwjcc!gatech!gitpyr!dvu From: dvu@pyr.gatech.EDU (Dinh Vu) Newsgroups: comp.lang.c Subject: pointer & struct Message-ID: <7208@pyr.gatech.EDU> Date: 2 Feb 89 14:15:48 GMT Distribution: usa Organization: Georgia Institute of Technology Lines: 32 I am learning C, and having difficulty with pointers, and structures. The small program below compiled fine, but it gave core dump when I run it. Would someone give me some light on this matter. #include struct abc { int x; int y; }; main() { struct abc *var; var->x = 5; var->y = 10; } ====================================================================== Why have sex today, when you can have it tomorrow! -a horny procrastinator Dinh Vu Georgia Insitute of Technology, Atlanta Georgia, 30332 ...!{akgua,allegra,amd,hplabs,ihnp4,seismo,ut-ngp}!gatech!gitpyr!dvu ======================================================================