Declare additional helper function like this:
template <class T, class I >
bool vectorContains(const vector<T>& v, I& t)
{
bool found = (std::find(v.begin(), v.end(), t) != v.end());
return found;
}
And use it like this:
void Project::AddPlatform(const char* platform)
{
if (!vectorContains(platforms, platform))
platforms.push_back(platform);
}
Snapshot of example can be found here: