How can I figure out the size of a file, in bytes?
#include unsigned int fsize(char* file){ //what goes here? }
If you're fine with using the std c library:
#include off_t fsize(char *file) { struct stat filestat; if (stat(file, &filestat) == 0) { return filestat.st_size; } return 0; }