If loops are still troubling you I would suggest reading through the loops tutorial on this site (here is a quick link to it:
http://www.cplusplus.com/doc/tutorial/control/#loops )
Also the reason behind your program only executing addition is due to the conditional statements you used. For example, you used
if(function == "Add" or "add")
but this is not doing what you think it is, in fact what this statement means is the following:
if the statement
function == "Add"
is true OR the statement
"add"
is true then execute the body of this if.
This is the issue because you are not checking if
function == "add"
you are just checking
"add"
which makes no sense. What this should be converted to is this:
if (function == "Add" or function == "add")
That way you check to see if function is equal to "Add" or if function is equal to "add".
Another equivalent expression to your original if statement which may help you understand why it is wrong is the following:
if (function == "Add" or "add" == true)
This statement isn't valid in C++, but it may give you a better picture of whats going on.