Recommended Posts

Question: How would I determine if a "key" exists in a map?
Background: Im making an image manager that has a single function that takes a string paramater that is the file folder/file name of the image file. Example:

Image& Ret(string FileName)

I want it to return a reference to the image in memory. This function will have a dual function as "getter" and "setter." The map is <FileName, Image> so the keys will be the FileName. How would I go about determining if map[FileName] exists? I tried using find() but it returns an iterator and I tried evaluating it as NULL but it didnt work, so im kind of lost as to how I would check it or if there is a better way.
Thank you for the help :)
Edit: Also, is it possible to use strings with enums? Example: