Raised This Month: $ Target: $400
 0% 

May I store both int and string in the same Trie?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hzqst
Senior Member
Join Date: Jul 2008
Old 11-18-2011 , 06:16   May I store both int and string in the same Trie?
Reply With Quote #1

just like:
PHP Code:
                new Key[2]
                
Key[0] = 123
                TrieSetString
(store[0], Key"goodman");
                
Key[0] = 1
                TrieSetCell
(store[0], Key12345); 
hzqst is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-18-2011 , 07:57   Re: May I store both int and string in the same Trie?
Reply With Quote #2

You can (though the key should be a string not an array), but why don't you test yourself ? It takes 30 seconds. Learn to test yourself before asking here.
__________________
Arkshine is offline
hzqst
Senior Member
Join Date: Jul 2008
Old 11-18-2011 , 08:30   Re: May I store both int and string in the same Trie?
Reply With Quote #3

Quote:
Originally Posted by Arkshine View Post
You can (though the key should be a string not an array), but why don't you test yourself ? It takes 30 seconds. Learn to test yourself before asking here.
Tested, it works with the code above
But later , when I try to store more, they just can not be read regularly

Last edited by hzqst; 11-18-2011 at 08:30.
hzqst is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode