B
Bill Cunningham
I have this code written like this:
#include <stdio.h>
#include <sys/stat.h>
int main()
{
int i;
struct stat st;
if ((i = stat("/bin/e", &st)) == -1) {
fputs("stat error", stderr);
return -1;
}
printf("%i\n", st.st_blocks);
printf("%i\n", st.st_blksize);
return 0;
}
Now if I wanted instead of
struct stat st;
struct stat *st;
How would that change the second parameter to stat()? Would it be st instead
of &st, or *st ?
Bill
#include <stdio.h>
#include <sys/stat.h>
int main()
{
int i;
struct stat st;
if ((i = stat("/bin/e", &st)) == -1) {
fputs("stat error", stderr);
return -1;
}
printf("%i\n", st.st_blocks);
printf("%i\n", st.st_blksize);
return 0;
}
Now if I wanted instead of
struct stat st;
struct stat *st;
How would that change the second parameter to stat()? Would it be st instead
of &st, or *st ?
Bill