I\'ve read a getopt() example but it doesn\'t show how to accept integers as argument options, like cvalue would be in the code from the example:
cvalue
No, you can't just cast to convert it to an integer value. You need to transform it using sscanf, atoi, atol or similar function.