Hi there! I'm wondering about enums. I had defined enums in a class like this:
Code:
class Enums
{
public:
enum COLOURS {BLACK, GRAY, RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE, BROWN, PINK, WHITE};
}
But I don't want to use the enums inside of that class. I want to use it in the main file like this:
Code:
#include <iostream>
using namespace std;
void SetColor(const int COLOR)
{
cout << COLOR << endl;
}
int main(int argc, char* argv[])
{
void SetColor(BLACK);
return 0;
}
Without getting a syntax error. Is it any possible way to do this? Thanks for help!