[Solved] Concept of creating Array of structures in C with three properties [closed]


Hi You can Implement a three dimensional array to store the RGB values and then do the operation you want.
The dummy code looks some thing like this:

    #define TOTAL_NO_OF_PIXEL 1080  //For example total 1080 no of pixels are there
    int RGBcolor[3][TOTAL_NO_OF_PIXEL];
    int main()
    {
        for(int cnt=0;cnt<TOTAL_NO_OF_PIXEL;cnt++)
        {
            RGBcolor[0][cnt] = RED;
            RGBcolor[1][cnt] = GREEN;
            RGBcolor[2][cnt] = BLUE;
        }    
        return 0;
    }

Hope this Helps.

3

solved Concept of creating Array of structures in C with three properties [closed]