T
tessellated
Hi all,
I want to iterate through a collection and at each item in the
collection access a particular property. In C# i know how to do this
easily, but with c++ I am a bit mystified Below is some sample code to
give you an idea of what i am trying to do.
SPGlobalAdmin * globAdmin = new SPGlobalAdmin();
SPVirtualServerCollection * servers = globAdmin->VirtualServers;
SPVirtualServer * vserver;
for (i = 0; i < servers->Count; i++)
{
//access properties of each vserver here
}
If this were c# I would just use a foreach loop like this
SPGlobalAdmin globAdmin = new SPGlobalAdmin();
foreach (SPVirtualServer vServer in globAdmin.VirtualServers)
{
string url = vServer.Url;
}
How to do this with c++?
I want to iterate through a collection and at each item in the
collection access a particular property. In C# i know how to do this
easily, but with c++ I am a bit mystified Below is some sample code to
give you an idea of what i am trying to do.
SPGlobalAdmin * globAdmin = new SPGlobalAdmin();
SPVirtualServerCollection * servers = globAdmin->VirtualServers;
SPVirtualServer * vserver;
for (i = 0; i < servers->Count; i++)
{
//access properties of each vserver here
}
If this were c# I would just use a foreach loop like this
SPGlobalAdmin globAdmin = new SPGlobalAdmin();
foreach (SPVirtualServer vServer in globAdmin.VirtualServers)
{
string url = vServer.Url;
}
How to do this with c++?