Writing own compiler and language.

I decided to write my own language and compiler. My question is, what is the best way to handle user declared variables. In my language there is already a defined type of jpg/bmp/etc that can be used to declare handles to images. The closest thing I've been able to come up with it is building my own map class (similar to std::map) that builds a binary tree with the nodes being the variable name (as a string) having a pointer holding the image information.

I was wondering if there was a better way of resolving variable names.
Topic archived. No new replies allowed.