- فبراير 12, 2014
- منشور من طرف: فريق ويكي الفوركس
- فئة: غير مصنف
لا توجد تعليقات
1668
1535
اسم: |
|
||
مؤلف: | Andrew Lord (2014.02.11 16:34) | ||
تم التنزيل: | 6 | ||
تحميل: |
|
||
وصف:This is a HashMap implementation. This allows something like arrays but with string indexes. It maps strings to Objects. The Objects must be a subclass of the HashValue class provided. The Hash by default will 'adopt' the value objects. In which case it will free the memory when they are no longer in the hash. This can be disabled in the constructor. Here is an example:
Hash *h = new Hash(); // Store values h.hPutInt("قليل",0); h.hPutInt("عالي",1); // Get values int high = h.gGetInt("عالي"); // Loop HashLoop *l ; ل( l = new HashLoop(ح) ; l.hasNext() ; l.next()) { string key = l.key(); int j = l.valInt(); Print(key," = ",j); } delete l; delete h; التوصيات:
|