正在加载图片...
2.编写一个模板函数Copy template <class T> void copy(Ta[],Tb,intn);∥数组b复制到a写一个主程 序测试copy函数 (1) int aint6],Bint6]={1,3,5,7,9,11} (2) struct Student t int num; double score: } Student Astudent [3] Student student[3]={{100,88},{110,76},{130,92}2. 编写一个模板函数 Copy template <class T> void copy(T a[], T b[], int n); // 数组b复制到a,写一个主程 序测试 copy 函数 (1) int Aint[6], Bint[6] = {1, 3, 5, 7, 9, 11}; (2) struct Student { int num; double score; }; Student Astudent[3]; Student Bstudent[3] = {{100, 88}, {110, 76}, {130, 92}};
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有