Hi, I've been trying to create an accessor for my class that returns an array of structs as well as another that returns just a simple char array, but I can't seem to figure out how to do it, I had assumed it would just be
Example_Struct Foo::GetStructBar()
{
return structBar;
}
char Foo::GetBar()
{
return bar;
}
Where structBar is an array of structs and bar is a char array.
This does not function and I have tried searching for a solution but all I see are messy solutions involving static arrays and passing in an array as a pointer, this is an accessor for a private data member, these don't seem like very good ways to go about it.