I have a function which call by
test0.write() to write to some register
how do I do this
char str[7]="test";
strcat(str, "0");
so I can do this
str.write()
basically this will equal to test0.write()
I have a function which call by
test0.write() to write to some register
how do I do this
char str[7]="test";
strcat(str, "0");
so I can do this
str.write()
basically this will equal to test0.write()
You can't construct an object's variable name from a string and call methods on it.
Looks like you're looking for an array of objects you can select by index.
This is C++, BTW.
A little inaccuracy saves tons of explanation. - H.H. Munro