file 1.c
#include<stdio.h>
void fun();
typedef struct
{
int aa;
char* b;
}a;
void fun()
{
a *a1;
a1->aa = 12;
a1->b = (char*)malloc(sizeof(5));
a1->b = "hello";
printf("hello====%d\n",a1->b);
}
file2.c
#include<stdio.h>
extern a1
int main()
{
printf("%d\n",a1->b);
return 0;
}
i am not able to excute file2.c .. how can i use struct member b , without including this file(file1.c) into file2.c ,since both are in the same directory
#include<stdio.h>
void fun();
typedef struct
{
int aa;
char* b;
}a;
void fun()
{
a *a1;
a1->aa = 12;
a1->b = (char*)malloc(sizeof(5));
a1->b = "hello";
printf("hello====%d\n",a1->b);
}
file2.c
#include<stdio.h>
extern a1
int main()
{
printf("%d\n",a1->b);
return 0;
}
i am not able to excute file2.c .. how can i use struct member b , without including this file(file1.c) into file2.c ,since both are in the same directory