Alright guys, I have a really weird error here. I'm programming a program that lets you specify the red, green, and blue components then stores them in arrays and uses the colors when drawing shapes. The program worked perfectly until about five minutes ago. Nothing affecting that specific part of the code was changed. I just added a function that deals with the simulation of a turn of a rubik's cube. So anyway, I'm using OpenGL with c++. I'm on Windows XP Sp. 3. I'm using Microsoft Visual Studio 2008 Express Edition. Here's the error and code:
int r; int b; int g; // here are three arrays. The error only appears on the "b" , or blue, // array. // Here is how the code is being accessed: glColor3f(r,g,b); // the error: error C2040: 'b' : 'int ' differs in levels of indirection // from 'int' // the error appears on the line of: int b;
Thanks a lot! I have no idea what this is all about.