Hi!Could you tell me why I get this message: warning: structure defined inside parms,when I run the program???
Code:
#include <stdio.h>
struct test
{
char x;
int y;
float z;
char lex[25];
};
void function(p)
struct
{
char c;
int i;
float d;
char c1;
char c2;
char c3;
char str1[12];
char str2[10];
}p;
{
printf("%c\n",p.c);
printf("%d\n",p.i);
printf("%f\n",p.d);
printf("%c\n",p.c1);
printf("%c\n",p.c2);
printf("%c\n",p.c3);
printf("%s\n",p.str1);
printf("%s\n",p.str2);
}
int main()
{
struct test f;
f.x='A';
f.y=120;
f.z=3.14159;
strcpy(f.lex,"Hello");
function(f);
return 0;
}