I wrote a small coordinate class to handle both int and float coordinates.
template class vector2 { public: vector2() { memset(this, 0, s
The problem is this is a Pointer type, which is 4 bytes (on 32bit systems), and ints are 4 bytes (on 32bit systems). Try:
sizeof(*this)
Edit: Though I agree with others that initializer lists in the constructor are probably the correct solution here.