>>and i'm not too sure how to use the SizeOf Function, I need to use it to verify that an inputted integer is not greater than the maximun number of bytes allowed
First things first, sizeof isn't a function, it's an operator :-) And it returns the number of bytes of the object you pass to it, not the maximum value that can be held by those bytes. So your problem could be solved like this
Code:
#include <stdio.h>
int main(void)
{
if (sizeof(int) > 2)
/* Only allow the minimum integer size */
{
fprintf(stderr, "Fatal error: Integer size too large\n");
}
return 0;
}