- 博客(3)
- 收藏
- 关注
原创 c++关键字template,函数模板及类模板
其通常的定义形式如下所示。其中,关键字template和typename是必须的,必须使用尖括号<>。模板定义和使用常规函数时相同,在函数原型和函数定义处都需要使用template关键字进行说明。template <typename AnyType> //建立一个模板,类型命名为AnyTypea : b;compare<int>(1, 2) //使用函数模板compare(1, 2) //实参推断,为(int)1、(int)2 类型。
2024-08-22 11:29:03
715
原创 虚拟机ubuntu离线安装VScode插件
注:第六步安装插件时不要加sudo,会出现You are trying to start Visual Studio Code as a super user which isn’t recommended. If this was intended, please add the argument ‘–no=sandbox’ and specify an alternate user data directory using the --user-data-dir argument的问题。
2024-08-19 09:20:15
906
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人