0
(0)
नाम:
HashMap implementation
लेखक: Andrew Lord (2014.02.11 16:34)
डाउनलोड: 6
डाउनलोड करना:
HashMap implementation 1
hash.mqh (14.5 केबी) देखना

विवरण:

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," = ",जे);

    }
    delete l;

    delete h;

सिफारिशों:

  • Accompany the submitted code with a meaning-bearing name and a brief description.
  • Attach a brief explanation to the code for users to make head or tail of it.
  • Insert illustrating images where applicable.

ये पोस्ट कितनी उपयोगी थी?

इसे रेट करने के लिए किसी स्टार पर क्लिक करें!

औसत श्रेणी 0 / 5. वोटों की गिनती: 0

अभी तक कोई वोट नहीं! इस पोस्ट को रेट करने वाले पहले व्यक्ति बनें.

हमें खेद है कि यह पोस्ट आपके लिए उपयोगी नहीं रही!

आइए इस पोस्ट को बेहतर बनाएं!

हमें बताएं कि हम इस पोस्ट को कैसे बेहतर बना सकते हैं?



लेखक: विदेशी मुद्रा विकी टीम
हम अत्यधिक अनुभवी विदेशी मुद्रा व्यापारियों की एक टीम हैं [2000-2023] जो अपनी शर्तों पर जीवन जीने के लिए समर्पित हैं. हमारा प्राथमिक उद्देश्य वित्तीय स्वतंत्रता और स्वतंत्रता प्राप्त करना है, और हमने स्व-शिक्षा का अनुसरण किया है और एक स्व-टिकाऊ जीवन शैली प्राप्त करने के हमारे साधन के रूप में विदेशी मुद्रा बाजार में व्यापक अनुभव प्राप्त किया है।.