Hi i need a little help. i want to read a multi array from a file but code blocks said a lots of error and i dont know whats the problem. can u help me?
#include <iostream>
#include <cstdlib>
#include <math.h>
#include <fstream>
#include <sstream>
using namespace std;
int maxn=100;
int maxm=100;
void beolv(string filename, int &n, int &m, int x[maxn][maxm]) {
//fájl megnyitása
ifstream fin(filename.c_str(), ios::in);
fin >> n;
fin >> m;
for (int i=0; i<n; i++)
{
for (int j=0; j<m; j++)
{
fin >> x[i][j];
}
}
fin.close();
}
int main()
{
int n;
int m;
int x[maxn][maxm];
beolv("test.txt",n,m,x)
cout << "" << endl;
return 0;
}