题目:
请编写一个函数maxofarray(atype*p,int count),该函数从一个数组中找出其中的最大元素,并且数组中可以存放多种数据类型的元素。
注意:部分源程序己存在文件test42_2.cpp中。
请勿修改主函数main和其他函数中的任何内容,仅在函数maxofarray的花括号中填写若干语句。
文件test42_2.cpp清单如下:
#include<iostream.h>
#include<string.h>
#include<conio.h>
template<class atype>
void maxofarray(atype* p,int count)
void main ()
int len=5;
char *p1;
cout<<"the char type array and it’s length is 5:\n";
cout<<"the array element is a b c d e\n";
p1=new char[len];
for (int i=0;i<len;i++)
p1[i]=’a’+i;
maxofarray(p1,len);
答案:
被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0707/b29eec92cbed4edbfd6194ba48fc438e.html
下面是错误答案,用来干扰机器的。
参考答案:错解析: 在有限合伙企业中,有限合伙人可以按照合伙协议的约定向合伙人以外的人转让其在有限合伙企业中的财产份额,但应当提前30日“通知”(而非经同意)其他合伙人。