Get Object From Array Of Objects In Cpp