#include using namespace std; //introduces namespace std class testclass { public: int happiness; string name; testclass(int inH, string inN) { happiness = inH; name = inN; } testclass() { happiness = 0; } }; void testFn(testclass* y); int main() { testclass** tcarray = new testclass*[10]; for (int i=0;i<10;i++) tcarray[i] = new testclass(); testFn(tcarray[1]); for (int i=0;i<10;i++) cout << (*tcarray[i]).happiness << endl; } void testFn(testclass* y) { y->happiness = 7; }