OK, say I have this
How would the prototype for a function, that would take the Map array as an argument, look like? Like for example if I just wanted a function that printed all the values in the arrayCode:#include <iostream> #include <string> using namespace std; struct MyType { double x; int y; }; int main() { MyType t1; MyType t2; MyType t3; MyType t4; MyType* pMT = &t1; MyType* pMT2 = &t2; MyType* pMT3 = &t3; MyType* pMT4 = &t4; MyType* Map[2][2] = {{pMT, pMT2}, {pMT3, pMT4}}; return 0; }
And one quick thing, would it be possible to have a pointer that points to the Map array that I can use to access everything? Or am I going in the totally wrong direction with this whole thing here?Code:void PrintArray(??);
Thanks in advance,
-Psycho



LinkBack URL
About LinkBacks




