From: Jukka Mickelsson Newsgroups: comp.os.msdos.djgpp Subject: How to use malloc? Date: Fri, 23 Jan 1998 15:45:03 +0200 Organization: DLC Data Link Connections Lines: 23 Message-ID: <34C89EDF.ACBAE798@no-spam.mbnet.fi> NNTP-Posting-Host: 195.218.68.124 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I have a problem using the malloc() function since I don't really know what to do with it. I have the following type program: struct menuitem() { // this source code is simplified char *description[25]; } struct menuitem menu[5]; for(i=0; i<5; i++) for(e=0; e 3 the program starts to act in a weird way or crashes sometimes. I probably should use malloc() here but I haven't got a slightest idea _where_ and _how_. Could anyone help?