摘要:
#include using namespace std; template class MyClass{ public: typename T::SubType * ptr;//vc6里面,此处“typename”可有可无,vs2010里面,此处“typename”必须有 }; class Test{ public: typedef int SubType; }; v... 阅读全文
摘要:
#include using namespace std; template class Test{ public: T1 NumNBei(T1 num,T2 N) { return num*N; } }; void main() { Test t; double x= t.NumNBei(2.3,2); cout<<x<<end... 阅读全文
摘要:
#include int main() { #if _PLATFORM_ == _PLATFORM_TRU64 printf("Hello _PLATFORM_TRU64!\n"); #endif #if _PLATFORM_ == _PLATFORM_WIN32 printf("Hello _PLATFORM_WIN32!\n"); #endif return 0... 阅读全文