Hello! I'm trying to put a struct on a header file. Here is the code:
Code:
#ifndef _STRUCTS_H_
#define _STRUCTS_H_
#define MAX_SIZE 1000
typedef struct {
char Name [MAX_SIZE];
char Gender [2];
int Age;
} pData;
#endif //_STRUCTS_H_
But whenever I compile the header file itself, I got an error:
Code:
C:\Program Files (x86)\Dev-Cpp\MinGW32\lib\libmingw32.a(main.o) In function `main':91 e:\p\giaw\src\pkg\mingwrt-4.0.3-1-mingw32-src\mingwrt-4.0.3-1-mingw32-src\src\libcrt\crt\main.c undefined reference to `WinMain@16'
C:\Users\USER\Desktop\PROG\C\Data Collector\collect2.exe [Error] ld returned 1 exit status
What is "undefined reference to `WinMain@16'"?
And how can I successfully put my structs in a header file?
Thanks in advance!