Hallo Leute,
ich bin neu im Breich C, also danke für
euer Verständnis für eine wahrscheinlich
triviale Frage.
Ich habe folgenden Code:
und bekomm dabei den im Btreff genannten Fehler:
Vielen Dank für eure Hilfe
ich bin neu im Breich C, also danke für
euer Verständnis für eine wahrscheinlich
triviale Frage.
Ich habe folgenden Code:
Code:
#define A 8
#define B 8
struct Position
{
int x;
int y;
int is_taken;
};
struct Brett
{
int a;
int b;
int damenCount;
int positionsCount;
struct Dame *damen;
struct Position positions[A][B];
struct Position next_Position;
};
struct Brett spielbrett;
void add_Position(struct Position position)
{
spielbrett.positions[position.x][position.y]=position;
spielbrett.positionsCount++;
}
int main(){
int x=0, y;
for(;x < A;x++)
for(y=0;y < B;y++){
struct Position position;
position.x = x;
position.y = y;
position.is_taken = 0;
add_Position(position);
}
}
und bekomm dabei den im Btreff genannten Fehler:
HTML:
conflicting types for 'add_Position'
previous implicit declaration of 'add_Position' was here
Vielen Dank für eure Hilfe