in
Code: Alles auswählen
int main( void )
{
char playField[9]; //ne neun hier reingehoert...
unsigned int x, y;
printf( "Das Spielfeld ist %d Bytes groß.\n", sizeof( playField ));
for( x = 0; x < 3; ++x )
{
for( y = 0; y < 3; ++y )
{
playField[3*x+y] = ' ';
printf( "Addresse von %d/%d: %lx\n", x, y, &( playField[3*x+y] ) );
}
}
return EXIT_SUCCESS;
}
(Strukturen verwalten)
außerdem heult codeblocks mit warnings rum. zwei stück. für sowenig codezeilen.
/tmp/c1/main.c|9|Warnung: Format »%d« erwartet Argumenttyp »int«, aber Argument 2 hat Typ »long unsigned int« [-Wformat=]|
/tmp/c1/main.c|16|Warnung: Format »%lx« erwartet Argumenttyp »long unsigned int«, aber Argument 4 hat Typ »char *« [-Wformat=]|