Hello guys,
I've a class with a cpp and .h files. It's a part of a large program. I would like to create an array of structs and use it wherever in the same class, i.e. I want to initialize it in a specific function and use it in other functions within the same class.
Example:
//aFile.h
// mySimpleClass
private:
typedef struct myStruct {
int age;
} MyStruct;
void myFct1 (void) {...};
int myFct2 (void) {...};
//aFile.cpp
// intialize an array of MyStruct in myFct1
// use the array in the other functions
How can I do that?
Thank you!