vs2008条件编译不能用?
我在vs2008里用条件编译不管用,得用#pragma once才管用,怎么回事?
#ifndef _COMMON_H_#define _COMMOM_H_#include <queue>using std::queue;enum direct { east=1,north=2,west=3,south=4 };template<class T>class LimitQueue{private: unsigned int length; queue<T> container;public: LimitQueue(unsigned int) { this->length=i; } bool push(T element) { if(container.size()<length) { container.push(element); return true; } else { return false; } } T front() { return container.front(); } void pop() { container.pop(); }};#endif