struct pixelcolor int r g b pixelcolor black blackr 0 bla
struct pixel_color
{
int r, g, b:
}
pixel_color black;
black.r = 0;
black.g = 0;
black.b = 0;
I get the error \'black\' does not name a type
what am I going wrong??????
Solution
struct pixel_color
{
int r, g, b;
}
pixel_color black;
black.r = 0;
black.g = 0;
black.b = 0;
/*In the structure declaration keep semicolon instead of colon*/