A. typedef std::set<BaseDlg*> DlgSet

能帮我具体讲下这句话都是什么意思?
谢谢~

 

B.

<>是指定模板参数。如:
#include<iostream>
using namespace std;
template < typename T >
class A
{
private:
T a;
public:
A( T aa ):a(aa){}
~A(){}
void print(){ cout<<a<<endl; }
};
int main()
{
A<int> a(10);
a.print();
A<double> b( 230.442 );
b.print();

return 0;
}

这里就是从此以后有DlgSet的地方就可以用set<BaseDlg*>来代替,省点打代码的时间。

相关文章:

  • 2021-12-27
  • 2021-11-15
  • 2021-10-31
  • 2021-06-19
  • 2021-10-18
  • 2021-11-26
猜你喜欢
  • 2022-12-23
  • 2022-02-03
  • 2022-12-23
  • 2021-12-08
  • 2022-12-23
  • 2021-07-13
相关资源
相似解决方案