function prototype: void BubbleSort( int &inArray, int &nsize);
calling from main
BubbleSort (arr, size);
error C2664: 'BubbleSort' : cannot convert parameter 1 from 'int [5]' to 'int &'
:confused:
Printable View
function prototype: void BubbleSort( int &inArray, int &nsize);
calling from main
BubbleSort (arr, size);
error C2664: 'BubbleSort' : cannot convert parameter 1 from 'int [5]' to 'int &'
:confused:
Maybe...
Instead of...Code:void BubbleSort( int *inArray, int &nsize);
As both prototype and where you actually define the function.Code:void BubbleSort( int &inArray, int &nsize);
Arrays are automatically passed by reference, so don't use either the * or & operator in your function prototype.