home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!gumby!destroyer!wsu-cs!vela!jmwojtal
- From: jmwojtal@vela.acs.oakland.edu (Wojo)
- Subject: Stack overflow problems
- Message-ID: <1992Nov9.153526.22728@vela.acs.oakland.edu>
- Organization: Oakland University, Rochester MI.
- Date: Mon, 9 Nov 1992 15:35:26 GMT
- Lines: 42
-
- First of all, thank you for your responses about double arrays. Now I have
- another problem, I'm storing too much data in my program.
-
- I identified the main culprits:
-
- struct key {
- char *word;
- char pos;
- } keytab[] = {
- "0101", 1,
- .....
- "1302", 33};
-
- struct today {
- char count;
- char maxt;
- } timenow[33][31];
-
- char timetab[33][24];
-
- the 33 is the number of keytabs (I use a constant NKEYS in my program)
- the 31 is the maximum number of days in a month
- the 24 is the hours in a day;
-
- The program reads in files for a given month. All files have one day of
- information about information about "0101" thru "1302". There are between
- 1 to 15 lines of information an hour.
-
- I believe I have a logrithm to do it, but when I run it, garbage comes out of
- it, with different values of keytab even though I don't change them.
-
- Is there any way to eliminate the space problem without doing any major changes
- to the program?
-
- Thank You
-
-
- --
- ************************************************************************
- Jeff Wojtalewicz (Wojo) jmwojtal@vela.acs.oakland.edu
- Oakland University Start Hacking
- ************************************************************************
-