Q: How would I determine if a "key" exists in a map?
Context: 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 that has been stored in memory. The function will have a dual purpose of being a "setter" and "getter." The map is 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! :)