Monday, July 27, 2009

Is vector<objects> legal in C++?

also, how would i determin what the type of an object is.. string int, etc

Is vector%26lt;objects%26gt; legal in C++?
vector%26lt;objects%26gt; is completely legal in c++





to check type use





if (typeid(variable1) = typeid(variable2))


{


//types are equal, do work


}


No comments:

Post a Comment