Eliteofdelete
Member
I have a quick question involving functions and multiple strings.
Say, I have a simple functions like this one.
And I also have a list of item names like:
("item1", "item2", etc)
What is a good way to get the function to enact on each of these items without going like
I will probably be posting a lot longer post here in the next day or two when I have a little more free time and thanks for all the help so far.
Say, I have a simple functions like this one.
Code:
int function(string itemname) {
item x = to_item(itemname);
int y = mall_price(x);
return y;
}
And I also have a list of item names like:
("item1", "item2", etc)
What is a good way to get the function to enact on each of these items without going like
Code:
function("item1")
function("item2")
etc..
I will probably be posting a lot longer post here in the next day or two when I have a little more free time and thanks for all the help so far.