I just want to know if this is possible, i do not want someone to tell me how to do it.
I am wondering if you can use vectors to store a series of information at a given time
ex)(my homework which is y i just want to know if this is possible)
adding a planet and its information to a vector, then using the push_back() feature to put that vector inside another vector
(vector <double> planet_info() into vector <vector <double> > planet_list)
where planet_info() looks like
where the push_back() feature calls the function to input the dataCode:double planet_info() { push_back(name(string)); push_back(mass(string)); push_back(radius(string)); push_back(planet_type(string)); push_back(surface_area(string)); push_back(density(string)); push_back(gravity(string)); }



LinkBack URL
About LinkBacks


