Originally Posted by
JoshR
you don't necessarily have to use typename, it just feels weird using class lol.
Yeah, I know, hes right though, using typename makes more sense to use than class when refering to style, which is why he said "speaking of style".
Originally Posted by
JoshR
Ok, so I guess you cant use a templated class and move the functions outside of the class.
Dude, someone already provided a way to do that, which I echoed in the last post:
Code:
class Array
{
public:
Array(USHORT);
}
template< class Datatype >
Array< Datatype >::Array (USHORT p_sizeInitial)
{
m_array = new Datatype[p_sizeInitial];
m_size = p_sizeInitial;
}
Also in MSVC6 you can declare the methods as inline, and move the functions outside of the class (which the author of Game Structures for Game Programmers says):
Code:
class Array
{
public:
inline Array(USHORT);
}
Array::Array (USHORT p_sizeInitial)
{
m_array = new Datatype[p_sizeInitial];
m_size = p_sizeInitial;
}