Hello everyone. I'd like to get some help with this issue...
I've got a program that consists in 1 initialization of a library and 2 voids, like this:
Code:
init_library()
{
...
first(); // Once it's initialized, it takes me to the loop of void first() in which I use the program.
}
void first()
{
...
if(a=1){void second(); second();} //Example. If a=1, the code loop of void second() starts happening.
}
void second()
{
...
if(a=2){void first(); first();} //Example. If a=2, the code loop of void first() starts happening.
}
And basically it jumps from void to void all the time, which works perfectly.
My problem, however, is that in each void (first and second) I have to initialize hundreds of Bitmaps... and since I have to initialize the exact same ones both in void first and second, I thought it would be great to be able to initialize them all just once. (Also there are a lot of code lines that apply to both of the voids and that I'd like not to write them twice).
But the program is reluctant to work unless the bitmaps are declared in each void they are used. So, if you followed me up to this point, what I tried to do is to "get the 2 voids inside one void" to initialize the bitmaps in that big void, though it won't let me.
So, do you know of any way to work this out? Maybe using a .h or .rc? (tried but probably didn't link them right).
Any help is appreciated, and if you need further info, let me know. Thanks.