I'm attempting to parse a text file backwards. I have the parsing done, now I'm trying to give my function a limit so that it doesn't read my entire 5Mb-2Gb log file. I'm passing this limit as a size_t and I was trying to think of a way to default the limit to read everything in the file.
since passing -1 to an unsigned type will set the highest bit, I'm assuming this will mean I get the max size of size_t. I was wondering, is this bad form? Also, is there a better way to accomplish my goal.