L
lbrtchx
Hi,
~
I have found myself in need of some code resembling a Hashmap
~
This is easily done in Java this way:
~
import java.util.*;
// __
public class JMith00Test{
public static void main(String[] aArgs){
HashMap<String, Integer> HMSI = new HashMap<String, Integer>();
HMSI.put("one", (new Integer(1)));
HMSI.put("zwei", (new Integer(2)));
HMSI.put("tres", (new Integer(3)));
// __
String aK;
int iIxCnt = 0;
System.out.println("// __ HMSI.size(): |" + HMSI.size() + "|");
Iterator<String> IT = HMSI.keySet().iterator();
while(IT.hasNext()){
aK = IT.next();
System.out.println("// __ |" + iIxCnt + "|" + aK + "|" +
HMSI.get(aK) + "|");
++iIxCnt;
}
}
}
~
I was wondering if there are plain ANSI C hashmaps?
Thansk
lbrtchx
~
I have found myself in need of some code resembling a Hashmap
~
This is easily done in Java this way:
~
import java.util.*;
// __
public class JMith00Test{
public static void main(String[] aArgs){
HashMap<String, Integer> HMSI = new HashMap<String, Integer>();
HMSI.put("one", (new Integer(1)));
HMSI.put("zwei", (new Integer(2)));
HMSI.put("tres", (new Integer(3)));
// __
String aK;
int iIxCnt = 0;
System.out.println("// __ HMSI.size(): |" + HMSI.size() + "|");
Iterator<String> IT = HMSI.keySet().iterator();
while(IT.hasNext()){
aK = IT.next();
System.out.println("// __ |" + iIxCnt + "|" + aK + "|" +
HMSI.get(aK) + "|");
++iIxCnt;
}
}
}
~
I was wondering if there are plain ANSI C hashmaps?
Thansk
lbrtchx