You are not logged in.
|
|
Source code |
1 2 3 4 5 |
int main (void)
{
int matrix_g; //matrix größe, nur eine da quadratisch
int matrix_1[matrix_g][matrix_g], matrix_2[matrix_g][matrix_g], matrix_e[matrix_g][matrix_g];
int x, y;
|
vermutlich musste static davor schreiben, also "static int g=3;"
und generell: wozu globale variablen?![]()
Das geht so nicht.
Da muss ein const vor die Variable matrix_g hin. Jedoch kannst du sie dann nicht mehr ändern.
Du musst also das ganze dynamisch anlegen, dh mit malloc arbeiten.
This post has been edited 1 times, last edit by "TheGothic" (Jan 11th 2009, 6:19pm)
-