Re: [CODE] [Newbie] two_arguments bug

From: George (greerga@CIRCLEMUD.ORG)
Date: 06/30/98

On Tue, 30 Jun 1998, Ron Cole wrote:

>>   char *mobtype, *startloc;
>static char mobtype[MAX_INPUT_LENGTH], startloc[MAX_INPUT_LENGTH]
>You are declaring string pointers but no storage for the strings
>themselves.  The 'static' is optional depending on whether you want
>speed or low memory usage.  George would probably recommend dynamic
>buffers instead... :-)

What you have is fine if you remove the 'static'.  Otherwise you waste 512
bytes of memory when you're not in that function. :)

(But of course, the dynamic buffers would be even better.)

George Greer, | Genius may have its limitations, but          | stupidity is not thus handicapped.    |                  -- Elbert Hubbard

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/15/00 PST