std::map equivalent?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

std::map equivalent?

Xiangrong Fang
Hi,

Is there a std::map equivalent for free pascal?

Thanks,
Shannon

--



_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: std::map equivalent?

Torsten Bonde Christiansen
On 2012-06-12 15:38, Xiangrong Fang wrote:
> Hi,
>
> Is there a std::map equivalent for free pascal?
>
> Thanks,
> Shannon
If you wish to use generics you can try TFPGMap from the unit fgl.

It does about the same.

Kind regards,
Torsten Bonde Christiansen.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: std::map equivalent?

Alexander Shishkin
In reply to this post by Xiangrong Fang
12.06.2012 17:38, Xiangrong Fang пишет:

> Hi,
>
> Is there a std::map equivalent for free pascal?
>
> Thanks,
> Shannon
>
> --
>
>
>
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
gmap.TMap from fcl-stl.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: std::map equivalent?

Sven Barth-2
In reply to this post by Xiangrong Fang

Am 13.06.2012 11:36 schrieb "Alexander Shishkin" <[hidden email]>:
>
> 12.06.2012 17:38, Xiangrong Fang пишет:
>>
>> Hi,
>>
>> Is there a std::map equivalent for free pascal?
>>
>> Thanks,
>> Shannon
>>
>> --
>>
>>
>>
>> _______________________________________________
>> fpc-pascal maillist  -  [hidden email]
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>>
> gmap.TMap from fcl-stl.

But be careful with the types you use. As far as I remember the fcl-stl is not completely compatible with managed types like strings or records containing such types (TFPGList has no problem with them).

Regards,
Sven


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal