16 struct InstanceCount {
18 InstanceCount() : count( 0 ) {}
20 if ( count ) std::cout <<
"Number of MyVertex instances:" << count << std::endl;
24 static InstanceCount s_instances;
30 MyVertex::MyVertex(
float x,
float y,
float z ) : m_x( x ), m_y( y ), m_z( z ) { s_instances.count++; }