这就是我想要创建一个函数的地方,在那里我可以传递一个称为节点的结构数组。
去学习函数
void shellSort(node* arr[]);
node* arrayz;
arrayz = new node[counterElements]我如何调用这个函数
shellSort(arrayz);
//How I define the function
void lists::shellSort(node* arrayz[])
{
//code here
}错误为::shellSort(节点**)与类列表//my类中的任何列表不匹配
发布于 2017-10-06 05:55:33
您应该将数组中的number of items传递给'shellSort`‘函数。基于此,函数的声明应该是:
void lists::shellSort(node* arrayz, int nItems)
{
//code here
}
//You should call this function as
node* arrayz;
arrayz = new node[counterElements]
shellSort(arrayz, counterElements);https://stackoverflow.com/questions/46598841
复制相似问题