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

Re: changing directories and getting filedates

Felix Kollmann wrote:

>Hmm, now it works. I wrote:
>	struct stat *buffer;
>	stat ("some/file", buffer);

No, that won't work. Unless you're lucky.
stat writes to the address you give it, assuming that it is a correctly
created/allocated stat structure. But your "buffer" pointer just points
*somewhere* - and certainly not to a correctly allocated structure.

At least not according to your code snippet.


Drive A: not responding...Formatting C: instead