CucumberBilly
asked on
How do you pass a C++ array element by reference?
How do you pass an individual C++ array element by reference? Is this possible?
Suppose you have the following class and array. How would you pass an element of that array into some function while changing the actual element of that array as well as the members of that class instance?
Suppose you have the following class and array. How would you pass an element of that array into some function while changing the actual element of that array as well as the members of that class instance?
class MyClass
{
public:
int member1;
int member2;
float member3;
};
MyClass myClassArray[ 10 ];
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
A single array element is both semantically and syntactically identical to its scalar counterpart.
ASKER