In my text-based RPG, I am currently developing the (simple) combat system. However, I have run into some trouble along the way. In this section of the code, when the player presses 'a' or 'A', the enemy's (goblin's) HP is decreased by a random value near the playerDMG value. However, that is not where the problem lies. After this "attack" has occurred, and the goblin's HP has been subtracted, I set a string (actionMSG) which displays in the HUD at the start of the main loop. Here is where I hit a roadblock. I want the message to be, for example, "Normal Attack! - 49 DMG!", but I get the error, "1>c:\documents and settings\*********\desktop\other\coding\rpg_combat\rpg_combat\main.cpp(70) : error C2110: '+' : cannot add two pointers".
The reason is because the system does not have a way to add a const char* and a string ("stuff" + string), but string has a way to add a string and a const char* (string + "stuff").