In my program I have something that would be like a status that is an int variable. Currently, the status is being set by just using a number relevant to the actual status. Instead of just writing status = 1, status = 2 it's better to make the numbers as names, right? Would it be better for all the status names to be const int or put it all into an enum? In code it'd be like:
Also, the status is used across mutliple files. Const ints could be externed, but for enum would you extern a single one or create multiple variables of the enum?Code:const int STATUS_ACTIVE = 0, /*etc*/; enum StatusEnum {STATUS_ACTIVE, /*etc*/};



LinkBack URL
About LinkBacks



Want to add some