Accessing an array from a diffrent class.
If I create a function in one class that returns an array then, in general, how can I assign that return to a new array in a different class? For instance, I created a function that returns an array:
for(int i = 0; i < versions.size(); ++i)
std::cout << "Firmware Versions: " << versions.at(i) << std::endl;
I imported the header file for the first class into this class and now I am trying to assign the return value of that function to this new array:
versions = Dynamic::versionVector();
however, it is saying: 'versionVector' is not a member of Dynamic
Maybe you spelled versionVector wrong - check your capitalisation.
Maybe you made it private or protected, when it should be public.
If you're still stuck, produce a stripped down Dynamic class with one method versionVector, and one member variable versions.