A
Arcadefreaque
I'm realizing how little I know about C++ today as I try to convert
some functionality from VB.Net to C++.
I have a procedure that I need to pass a List of objects to, and
cannot see how to do this using C++. It's easy in VB.Net, so I'm
hoping it is just my silly misunderstanding of c++ that is preventing
me from doing this in c++.
In VB.Net, to create a couple of objects and add them into a generic
list, this is the code that is used:
' Assign parameter list for GEOCODING
Dim addrVal1 As New ESRI.ArcGIS.ADF.Web.Geocode.AddressValue("STREET",
pAddress)
Dim addrVal2 As New ESRI.ArcGIS.ADF.Web.Geocode.AddressValue("ZONE",
pZipcode)
Dim addrValColl As New System.Collections.Generic.List(Of
ESRI.ArcGIS.ADF.Web.Geocode.AddressValue)
addrValColl.Add(addrVal1)
addrValColl.Add(addrVal2)
In C++, I realize that creating the objects for the list would be
something like this:
Geocode::AddressValue __gc * addrVal1 = new
Geocode::AddressValue(S"STREET", pAddress);
Geocode::AddressValue __gc * addrVal1 = new
Geocode::AddressValue(S"ZONE", pZipcode);
But, how do I go about defining the AddrValColl apppropriately so that
I can add my two objects to it and then call my procedure?
Thanks in advance for any assistance you might be able to provide.
some functionality from VB.Net to C++.
I have a procedure that I need to pass a List of objects to, and
cannot see how to do this using C++. It's easy in VB.Net, so I'm
hoping it is just my silly misunderstanding of c++ that is preventing
me from doing this in c++.
In VB.Net, to create a couple of objects and add them into a generic
list, this is the code that is used:
' Assign parameter list for GEOCODING
Dim addrVal1 As New ESRI.ArcGIS.ADF.Web.Geocode.AddressValue("STREET",
pAddress)
Dim addrVal2 As New ESRI.ArcGIS.ADF.Web.Geocode.AddressValue("ZONE",
pZipcode)
Dim addrValColl As New System.Collections.Generic.List(Of
ESRI.ArcGIS.ADF.Web.Geocode.AddressValue)
addrValColl.Add(addrVal1)
addrValColl.Add(addrVal2)
In C++, I realize that creating the objects for the list would be
something like this:
Geocode::AddressValue __gc * addrVal1 = new
Geocode::AddressValue(S"STREET", pAddress);
Geocode::AddressValue __gc * addrVal1 = new
Geocode::AddressValue(S"ZONE", pZipcode);
But, how do I go about defining the AddrValColl apppropriately so that
I can add my two objects to it and then call my procedure?
Thanks in advance for any assistance you might be able to provide.