Currently working on a Lottery project for my CompSci class.
I've got 40 lottery ball images (1.BMP to 40.BMP) and I want to use a for loop to display each ball.
I can display them just fine if I call displayBMP all 40 times, but there has to be a prettier way of doing this.
string type = ".BMP";
for(int i = 0; i < 40; i++)
{
char alphanum = i;
//char* name = combine alphanum and type
displayBMP(name, randomX(), randomY());
}
Edit
Trying to put this junk in .cpp file for my header.
#include "Lottery.h"
void Lottery::initDisplay()
{
//Draw Some Lines
//Display Lottery balls 1-40
}
Any thoughts?