I try to return multiple values by reference.
enum Color {ORANGE, YELLOW, GREEN, BLUE, VIOLET, RED};
int main(int argc, const char * argv[])
{
CvScalar hsv_min, hsv_max;
choose_color(RED, hsv_min, hsv_max);
return 0;
}
void choose_color(Color farbe, CvScalar &min, CvScalar &max) {
switch (farbe) {
case ORANGE:
min = cvScalar(0,50,50);
max = cvScalar(0,255,255);
break;
default:
throw "choose color: invalid case!";
break;
}
};
Why do I get "use of undeclared identifier" for the choose_color call?