The pound sign at the beginning of the line indicates that it is a C pre-processor statement.
#include
#include <iostream>
#define
#define TOKEN new-value
#define DEFAULT_COLOR 1
#define RED 2
#define BLUE 3
as ints.
#define DEFAULT_COLOR 1
#define RED 2
#define BLUE 3
int enter_color();
int main()
{
...
int color_entered;
color_entered = enter_color();
if (color_entered == RED)
cout << "The RGB value is: 0xFF0000\n";
else if (color_entered == BLUE)
cout << "The RGB value is: 0x0000FF\n";
...
}
int enter_color()
{
string answer;
cout << "Enter a color (i.e. red): ";
cin >> answer;
if ((answer == "red") || (answer == "RED"))
return(RED);
if ((answer == "blue") || (answer == "BLUE"))
return(BLUE);
return(DEFAULT_COLOR);
}