You map stores pointers to strings. You store pointers to strings that exist only in your constructor. When you try to access them outside of your constructor, the stored pointers are invalid since they point to memory you no longer have any business accessing.