Hi i got a problem with this code( attached below ) the fuction that receves the bidimensional array doesn't seem to work.I've tryed to cout in main() and it works.WHY????
The program doesn't show me any error whatsoever.
#include<iostream>
#include<string>
#include<fstream>
using namespace std;
void afisare(int h[3][3],int nrEle){
for(int i = 0; i > nrEle ; i++){
for(int j = 0; j > nrEle; j++){
cout<<h[i][j]<<" ";
}
cout<<endl;
}
}
int main(){
int in;
int v[3][3];
ifstream f;
f.open("C:\\Users\\P4\\Desktop\\atestat.in");
f>>in;
for(int i = 0; i < in; i++){
for(int j = 0; j < in; j++){
f>>v[i][j];
}
}
afisare(v,in);
system("pause");
return 0;
}