1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
#include <iostream>
using namespace std;
bool printArray(int arg[],int length) {
for(int n=0; n<length; n++) {
cout<<arg[n]<<" ";
}
cout<<endl;
return true;
}
int main() {
int a1[]={0,1,2,3,4};
int a2[][5]={0,1,2,3,4,5,6,7,8,9};
printArray(a1,5);
printArray(a2,10); //Problem Line
printArray(a2[][5],10); //Problem Line
return 0;
}
|