Hello,
I have a function which puts a timestamp into an array location.
The code is as follows:
The problem is that whenever I enter a new timestamp into a new array element, all the previous timestamps in the array are changed to this new value.Code:time_t curtime; curtime = time(NULL); array[i] = ctime(&curtime);
Why does it do this, and how would I go about fixing it?
Thanks.