Why is the time
function usually used like this:
time_t currentTime;
currentTime = time( NULL );
instead of this:
time_t currentTime;
time( ¤tTime );
Is the first method used more just because it is arguably more readable? Or is there another reason?
Thanks.
Edit: Also, why was the time
function even designed this way? Why have two ways to set the variable?
It always seems to make more sense to return a value from a function than pass a paramter that is changed.
This might be because we learned on languages where functions and subroutines were different, don't know about these youngsters today.