[A89] Re: random numbers, pointers, problems


[Prev][Next][Index][Thread]

[A89] Re: random numbers, pointers, problems




> Oh joy.  I [actually, Andrew helped me] fixed the first problem, and have
> stumbled across another one.  When I try to run my program the second time,
> it gives me a bunch of bad stuff.  I read in the tigcc docs that not
> initializing static variables could do this, but I initialize all of my
> static variables.  What else can cause this?  Would my useing malloc have
> anything to do with it?

If you initialize them then you don't need static variables, normal ones will do
fine.
As for malloc, as long as you free() the allocated memory there shouldn't be a
problem.
Also, check that you don't write ouside of your own memory areas, that can
sometimes cause problems when running a program a second time.

--
 / Niklas Brunlid
Check out Prosit for the TI-89 / TI-92+ at http://prosit.ticalc.org
Random PQF v5.1 Quote follows:

It was the sort of thing you expected in the Street of Alchemists. The
neighbours *preferred* explosions, which were at least identifiable and
soon over. They were better than the smells, which crept up on you.
        -- (Terry Pratchett, Moving Pictures)






Follow-Ups: References: