正在加载图片...
29 // call integer function-template specialization 30 printArray a, ACOUNT ); Creates a function-template specialization of 2 cout < "Array b contains:"<< end l; printArray where int replaces T 33 call double function-template specialization 35 printArray( b, BCOUNT )i t Creates a function-template specialization of 37 cout < Array c contains:"<< end1; printArray where double replaces T 39 / call character function-template specialization 40 printArray( C, CCOUNT )i 41 return o Creates a function-template specialization of 23// end main printArray where char replaces T Array a contaIns: 12345 Array b contains 1.12.23.34.45.56.67.7 Array c contains: 0 2018, SEU. All rights reserved. 13© 2009, SEU. All rights reserved. © 2018, SEU. All rights reserved. 13 28 29 // call integer function-template specialization 30 printArray( a, ACOUNT ); 31 32 cout << "Array b contains:" << endl; 33 34 // call double function-template specialization 35 printArray( b, BCOUNT ); 36 37 cout << "Array c contains:" << endl; 38 39 // call character function-template specialization 40 printArray( c, CCOUNT ); 41 return 0; 42 } // end main Array a contains: 1 2 3 4 5 Array b contains: 1.1 2.2 3.3 4.4 5.5 6.6 7.7 Array c contains: H E L L O Creates a function-template specialization of printArray where int replaces T Creates a function-template specialization of printArray where double replaces T Creates a function-template specialization of printArray where char replaces T
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有