Can anyone tell me why this happens. I have a class with couple of member functions which are overloaded with different types. The goal was to mimic the behaviour of an heterogeneous container with a basic class and vector. When I assign a string directly it get's treated as if it is a boolean type. Here is a little bit of the code:
//Make a vector of 10 Homo's
vector<Homo> sapiens (10);
//Now hand craft some types
sapiens[0].add(1);
sapiens[1].add(2.00);
sapiens[2].add("Hello");
sapiens[3].add(true);
sapiens[4].add("something");
sapiens[5].add(55);
sapiens[6].add("empty");
sapiens[7].add(false);
sapiens[8].add(102.543);
sapiens[9].add("done");
/*now run through our vector and call the print function
on each one....*/
for(int i = 0; i < 10; i++)
{
sapiens[i].print();
}