Why does'nt this code work I know functions must know about things before they can use them, I thought the prototype did that guess not.
#include<stdio.h>
#include<conio.h>
void details1(struct baby *kayleigh_ptr);
int main()
{
struct baby{
int age;
char name[10];
};
struct baby kayleigh;
struct baby *kayleigh_ptr=&kayleigh;
details1(kayleigh_ptr);
getch();
return 0;
}
void detail1(struct baby *kayleigh_ptr)
{
kayleigh_ptr->age=10;
}
thanks leaner(wanting to ba master).