|
From: <chr...@cr...> - 2002-10-25 09:43:54
|
Who help me ? If i compiled this project with devcpp 4.9.6, i have messages
:
3 C:\Dev-Cpp\struc.c [Warning] `struct Forme' declared inside parameter
list
3 C:\Dev-Cpp\struc.c [Warning] its scope is only this definition or
declaration, which is probably
not what you want.
C:\Dev-Cpp\struc.c [Warning] In function `change_structure':
5 C:\Dev-Cpp\struc.c dereferencing pointer to incomplete type
6 C:\Dev-Cpp\struc.c dereferencing pointer to incomplete type
C:\Dev-Cpp\Makefile.win [Build Error] [struc.o] Error 1
Thanks for your help.
main.c
#include <stdio.h>
struct Forme
{
int type;
int couleur;
};
void change_structure(struct Forme *Forme);
int main(int argc, char *argv[])
{
struct Forme cercle;
change_structure(&cercle);
printf("cercle.type %d\n", cercle.type);
printf("cercle.couleur %d\n", cercle.couleur);
system("PAUSE");
return 0;
}
struc.c
void change_structure(struct Forme *Forme)
{
(*Forme).type=0;
(*Forme).couleur=1;
}
|