I cannot get my head around arrays at all, ive tried and tried and nothing i try works. I need to let a user enter 10 RGB values that are stored in arrays and then the user can select one of them to change the colour of something. I have tried for days to get it to work and I just cant do it, please someone give me an idea of how to do it :( :(
Ive tried this :
int c0[3];
if (inp == 'k')
{
for (i=0; i<2; i++)
{
do {
win.clear();
win << "Please Enter The Red Value: ";
win >> c0[i];
win << "Please Enter The Green Value: ";
win >> c0[i];
win << "Please Enter The Blue Value: ";
win >> c0[i];
win << "Add another colour? Y/N?: ";
win >> cont;
win.clear();
} while (cont == 'y' || i<2);
}
}
it doesnt work. this is in the main and im using a special library which is why it says win