maps

  • Thread starter Thread starter kelvin.koogan
  • Start date Start date
K

kelvin.koogan

I have a database table containing a sparse mapping from an integer to
a string. I retrieve this table into an OleDbDataReader. I'd then like
to copy the data into a map so I can quickly find the string
corresponding to an integer.

My initial thought is to use a std::map but this is causing all kinds
of problems converting between managed and unmanaged types.

Is std::map the right container or is there a better one in the .NET
class library?

If std::map is still the right container how can I convert from the
System::String returned by OleDbDataRead::GetString to something which
can go in a std::map, e.g. std::string and then back to a
System::String?

TIA,
KK
 
I have a database table containing a sparse mapping from an integer to
a string. I retrieve this table into an OleDbDataReader. I'd then like
to copy the data into a map so I can quickly find the string
corresponding to an integer.

My initial thought is to use a std::map but this is causing all kinds
of problems converting between managed and unmanaged types.

Is std::map the right container or is there a better one in the .NET
class library?

No, STL isn't usable for managed types until at least Orcas.
 
Back
Top