I am trying to get the size of a file in bytes using Lstat() in unix. I am getting this error when i try to print out the value "stat.st_size" which should be where the size in bytes is stored right?
The name of the file is take in as a command line argument.
workdamnit.cpp:67: error: request for member `st_size' in `stat', which is
of non-class type `int ()(const char*, stat*)'
Is this more of that crazy pointer stuff? Am I required to use them here?
status = lstat(argv, &buffer);
cout<<"the size is"<< stat.st_size<<endl;