- февраль 12, 2014
- Опубликовано: Команда Форекс Вики
- Категория: Без категории
Имя: |
|
||
Автор: | 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(); Распечатать(key," "=" ",Дж); } delete l; delete h; Рекомендации:
|