template15.c
来自「linux下编程用 编译软件」· C语言 代码 · 共 20 行
C
20 行
// { dg-do assemble }// GROUPS passed templatestemplate<class T> class Stack { public: Stack (int s = 10); //Comment out "= 10" and it will compile ~Stack(void); //Omitting "void" doesn't help}; template<class T> Stack<T>::~Stack(void) { }//If this definition comes before the one for ~Stack, the error message//about redeclaration of `void Stack<int>::~Stack()' will not occur.template<class T> Stack<T>::Stack(int s){ }int main () { Stack<int> stk(10);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?