[阅读: 362] 2005-01-03 13:00:07
template <class T, typename K> class objList
{
public:
static T* objFirst;
T* objNext;
K objKey;
objList(const K key)
{
objKey = key;
objNext = objFirst;
objFirst = (T *)this; // XX:
}
static T* getObject(const K& key);
};
Look the Line I marked with // XX.
which is meaning the varible objfirst is a type of "class objList", in one word, T == objList
but the problem here is , The class objList hasnot define the Macro T.
If you try to use this class, you will know , no idea about how to declare this class and how to use.
Don't believe it ?? try it . hahahah. (sorry for my poor english).
I don't mind if you r FAT.
I don't mind if you r UGLY.
I don't mind if you ACT CUTE.
But I can't STAND if you r FAT, UGLY and still ACT CUTE.