So, I was messing around with the ## operator a bit, (I'm pretty new to it), and was having some troubles. I was trying to use the ## operate to create a default object name.
The macro I made is:
#define CreateObjName(or,n,c) {(or) = ((n)##(c)); ++(c);}
Now, when I try to call this later...
fGameObject::fGameObject() : m_id(id_count), m_type(OBJ_DEFAULT_OBJ)
{
CreateObjName( m_name, default_name, obj_count );
++id_count;
}
// m_name is a const char*
// default_name is a const char*
// obj_count is an unsigned int
I get the following error:
error C2064: term does not evaluate to a function taking 1 arguments
Anyone know why I would be receiving this? Thanks in advance!