File last modified

I cannot read the last moment
the file was modified - it returns
"Most recent access" instead:
code:
</td>
<th><?FILE *fatr=fopen(iindname.c_str(), "r");
if(fatr){
struct stat statbuf;
fstat(fileno(fatr), &statbuf);
fclose(fatr);
?>
<?if(statbuf.st_size>1024)cout<<(statbuf.st_size/1024)<<" K";
else cout << statbuf.st_size?>
</th><th>
<? if (statbuf.st_mode & S_IREAD){?> r <?}
if (statbuf.st_mode & S_IWRITE){?> w <?}?>
</th><th>
<b><?=ctime(&statbuf.st_ctime)?></b>
Is there any other (more sure) method
to do this in C/C++?
:confused:

I'm not sure what that gibberish is. Some sort of scripting language based on c++?

But try using st_mtime instead of st_ctime.

No, this is native C/C++ - HTML-embedded (it is transcoded
to real C++ and compiled by common g++ - see preprocessor here -
now I try to crossplatform it :rolleyes: )

it does't help - all three vars (st_mtime, st_ctime and st_atime)
have the same values! What can be a problem?
OS is Linux RH9.

Use the ls command on the file in question.

ls -l file # show mtime
ls -lc file # show ctime
ls -lu file # show atime

Works!
Thank you!