Nie wiem czemu nie działa mi ten program. Testuję akurat jedną rzecz i nie mam pojęcia czemu on nie działa. Proszę nie pytać po co taki program, po prostu uczę się i chciałbym zrozumieć dlaczego mi to nie działa. Kompilator zwraca mi problem:
declaration of 't1' as multidimensional array must have bounds for all dimensions except the first
void czy_dziala_2(int t1[][], int t2[][], int k){
#include <iostream>
using namespace std;
const int N = 5;
void czy_dziala_2(int t1[][], int t2[][], int k){
cout << "Witam" << k << endl;}
}
int czy_dziala(int t[N][N] int k){
int t2[k][k];
czy_dziala_2(t, t2, k);
}
int main(){
int t[N][N] = {{1,2,3,4,5},{1,2,3,4,5}, {1,2,3,4,5}, {1,2,3,4,5}, {1,2,3,4,5}};
czy_dziala(t, 2);
}