Also I presume that you have created a defineMap object. if you used new or otherwise created a pointer to it, then you should be able to use the pointer to access chunk, which is your only member variable.

*** IGNORE FROM HERE ***
Well, a sprintf is like a printf to string.
So if you put a sprintf(buffer, "Hello") it will copy Hello to buffer.
But you can also add numbers!!
You can do it like:
sprintf(buffer, "The number is: %d", Number)
Yes, %d (also %i) represent a int.
You can also do it with other strings with %s.
*** FINISH IGNORING ***
I tought you didn't know about sprintf. My bad, sorry, I mistook the situation.

Anyways for security reasons you should use snprintf, but as far as you do it "for yourself" it should give no big harm.

Anyways, a Constructor is a Piece of Code in a Class that gets executed when you declare one. Want a example? Here:

123456789101112131415161718

class Example {
public:
Example() // Constructor
{
printf("Hello, I'm Example!\n");
}
~Example() // Destructor, will be called when you get out of the function
{
printf("Oh, GoodBye, I was the Example... :(");
getchar();
}
};
int main()
{
Example ex; // This will also print "Hello, I'm Example!", because it's in the constructor!return 0; // The destructor will now be called because you're leaving the main function, and will print "Oh, GoodBye, I was the Example... :(".// Also, in the destructor i've put a getchar. This will allow the console to stay up more time (Until you press a key)
}

Hey all again, ive tried various things, but i dont understand, i printf in one function and it comes out fine and then i do the same thing later on and it comes out with something entirely different (where the variable has not been changed).