can more variables have the same value in an enum ?

eg.

enum boolean
{
        true = 1, false = 0, TRUE = 1, FALSE = 0
};

Why don't you try it for yourself and find out? If the compiler doesn't complain, then you know its ok

The only point where your compiler might produce an error, is if you attempt to compile under C++, where true and false are reserved words which cannot be reused elsewhere. This shouldn't be an issue under C

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.