All pastes #292253 Raw Edit

Unnamed

public cpp v1 · immutable
#292253 ·published 2006-12-26 09:36 UTC
rendered paste body
	class GPlanet	{		public:			GPlanet();			virtual ~GPlanet();			void setName(std::string name) { this->myName = name; }			std::string getName(void) { return this->myName; }			void setDistance(float distance) { this->myDistance = distance; }			float getDistance(void) { return this->myDistance; }		private:            std::string myName;            float myDistance;	};	struct SortByDistance	{		bool operator () (const GPlanet& a1, const GPlanet& a2) const		{			return a1.getDistance() < a2.getDistance();		}	};