I've a function in a library (so, that I cannot change) like this:
char mName[MAX_PARAM_NAME_LEN];
void IParam::InitBool(const char* name) {
strcpy(mName, name);
}
I'd like to pass text as Text0
, Text1
(and so on) "faster", writing directly inside the function, starting from a text and an integer, without store additional variables on my own; such as:
int mIndex = 0;
InitBool("Text" + mIndex);
How would you do it? Wrap functions? Which one? Best approch? In C#
thats pretty done, I find hard to do it in C++
.