visual c++ - C++ what is wrong with my function call -
have following code in main method:
int main(int argc, char* argv[]) { color c1(10,1,2); hsl h=converttohsl(c1); return 0; }
with following converttohsl method:
hsl converttohsl(color const& c) { return hsl(0,0,0); }
and getting build errors in project. color class defined follows:
color::color(){} color::color(float r,float g,float b){ this->r=r; this->g=g; this->b=b; } color::~color(void){}
hsl defined follows:
hsl::hsl() {} hsl::hsl(float h,float s,float l) { this->h=h; this->s=s; this->l=l; } hsl::~hsl(void){}
with converttohsl method mentioned.
what possibly wrong?
c1
isn't declared. did mean
color c1(10,1,2);
Comments
Post a Comment