中国开发网: 论坛: 程序员情感CBD: 贴子 74677
furnace
Oh......
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.

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录