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 &'
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 &'
Games Reviews Previews Desktop Themes Downloads Paintball Forums Shareware Freeware and much more
The best in Technology and Gaming News
www.back2games.com
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);
"Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
-Christopher Hitchens
Arrays are automatically passed by reference, so don't use either the * or & operator in your function prototype.
FAQ
"The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.
"If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.