i'm writting a dll that has a vector and has a function to add an instance to the vector. heres the code i have in the dll
PHP Code:
vector<player> players(0);
export char* playerCreate(char *n = "", double si = 0)
{
string name = n;
player temp(name, static_cast<int>(si));
players.insert(players.size(), temp);
return (n);
}
i want to add the line players.insert(players.size(), temp); into the function, but i'm confussed how i can get the vector into the function. can anyone show me how to do it? thank you for your help.