Original Post
I'm using OpenGL with GLFW and I'm trying to get a number to display, and increment when I click a button.
int increment = 1;
y = 1;
char labelString[1];
sprintf(labelString, "%u", y);
attack = new GuiLabel(FontManager::font("medium"), labelString, -280, -70, 1.0, true);
add(attack);
Some notes:
y is a pointer to an integer stored in the header file.
GuiLabel, is what I'm using to display text. It sets the font, what you want to say, x pos, y pos, scale and shadow.
In my button code, I've simply got it going
y += 1;
but I'm getting the following error with this, that I don't know how to defeat:
cannot convert from 'int' to 'int *
Tried googling, but got nothing.
int increment = 1;
y = 1;
char labelString[1];
sprintf(labelString, "%u", y);
attack = new GuiLabel(FontManager::font("medium"), labelString, -280, -70, 1.0, true);
add(attack);
Some notes:
y is a pointer to an integer stored in the header file.
GuiLabel, is what I'm using to display text. It sets the font, what you want to say, x pos, y pos, scale and shadow.
In my button code, I've simply got it going
y += 1;
but I'm getting the following error with this, that I don't know how to defeat:
cannot convert from 'int' to 'int *
Tried googling, but got nothing.