Old Wolf wrote:
On Jul 16, 5:56 pm, gara.m...@gmail.com wrote:
Heyllo,
template<class T>
class Element
{
public:
virtual int operator == (T) = 0;
virtual int hash() = 0;
};
int exists(Element<T> * elem)
{
int h = elem->hash()%M;
for (int i=0; i < size_t[h]; i++)
This is a syntax error -- size_t is a keyword,
No, it's not. From the standard's point of view, it's a defined type from
the standard library. <cstddef>, <cstdio>, <cstring> and <ctime> should all
define std::size_t, and thus, their .h version puts size_t in the global
namespace. As std::size_t is a typedef from the C libraries, ::size_t is
also a reserved name. But it's not a keyword; maybe you're thinking of
wchar_t?
you can't apply array indexing to it
Though a poorly chosen name, it is legal. Size_t is a data member of the
class.
--
rbh
I can't seem to reply... every post I make never posts.