No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
4 Posted Topics
I currently have a functor that finds the closest entity (by calculated distance) to the current entity. (Vector3 is just a 3D coordinate class) [CODE] template<typename T> class MinDistanceBGE { private: Vector3 v; // The location of the 'asking' entity. public: MinDistanceBGE(Vector3 vInput):v(vInput) {} bool operator()(T t1, T t2) const … | |
I'm looking for the best way to make a method available to a sub class (not talking inheritance, polymorphism at all, just standalone classes!) without handing down a million pointers to each sub class. [code] Class A; // contains many instances of other classes. Class Z; // one of those … | |
I have a struct "Telegram" which contains a time offset, the Sender ID, the Receiver ID, and the Message itself: [CODE]struct Telegram { int Msg; // Message unsigned long Time; // Time offset (i.e., GetTicks() etc.) int Sender; // ID of Sender int Receiver; // ID of Receiver Telegram(int tMsg, … | |
I notice <vector> uses the constructor once and then uses the copy constructor for a class when creating all the other elements of a vector chain. So, if I have: [code] class MyClass { MyClass() { cout << "Constructor" << endl; } ~MyClass() { cout << "Deconstructor" << endl; } … |
The End.