Create Object Out Of Array In Cpp