By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,171 Members | 992 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,171 IT Pros & Developers. It's quick & easy.

2 dimensional map?

Roonie
P: 99
so i know that a map is an associative array with key and entry pairs.

is there any way to create a map that works using two key values to find one entry?
Mar 21 '07 #1
Share this Question
Share on Google+
1 Reply


DeMan
100+
P: 1,806
I would imagine you could implement one with little effort.....
You just require two things to point to the same thing. This of course ruins a 1-1 relationship, so if you rely on finding the key given a particular entry, you can't. But I see no reason (provided that all keys are unique, of course) why you couldn't have two (or indeed more) keys reference the same value.
Mar 21 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.