• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Add Hastable obj to a Vector?

 
Nils Persson
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to add Hashtable objects to an Vector, and the iterate through the Vector and retrieve the Hashtable value/key pairs?
I've tried with this:
 
Robert Ziel
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi nils,
a vector is used for storing objects
Hashtable is an object so i see no reason why
this should give any trouble..
when your want to use the hashtable you have to cast it back to a hashtable object..

Robert
 
Craig Lewis
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nils,
You don't want to use final as a varible name - it's a reserved word.
You need to iterate through the vector then iterate through the hashtable
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic