Witam,
Mam następujący problem.
Potrzebuje napisać funkcję, która będzie zwracała tablicę dwuwymiarową.
Deklaracja tablicy oraz jej wartości koniecznie muszą być wewnątrz funkcji i ta tablica będzie dalej wykorzystywana.
Bardzo proszę o pomoc.
Kod mojej funkcji:
Otrzymuję następujące błędy:
funkcje.c: In function 'Dane':
funkcje.c:47: error: expected expression before '{' token
funkcje.c:60: warning: return from incompatible pointer type
funkcje.c:60: warning: function returns address of local variable
funkcje.c:64: error: expected expression before '{' token
funkcje.c:75: warning: return from incompatible pointer type
funkcje.c:75: warning: function returns address of local variable
make.exe: *** [funkcje.o] Error 1
Mam następujący problem.
Potrzebuje napisać funkcję, która będzie zwracała tablicę dwuwymiarową.
Deklaracja tablicy oraz jej wartości koniecznie muszą być wewnątrz funkcji i ta tablica będzie dalej wykorzystywana.
Bardzo proszę o pomoc.
Kod mojej funkcji:
Kod: C / C++
Otrzymuję następujące błędy:
funkcje.c: In function 'Dane':
funkcje.c:47: error: expected expression before '{' token
funkcje.c:60: warning: return from incompatible pointer type
funkcje.c:60: warning: function returns address of local variable
funkcje.c:64: error: expected expression before '{' token
funkcje.c:75: warning: return from incompatible pointer type
funkcje.c:75: warning: function returns address of local variable
make.exe: *** [funkcje.o] Error 1