I'm writing a structure pass-by-reference example, but somehow I'm coming up with this error... any idea?
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Win32 Console Practice.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Win32 Console Practice.exe - 2 error(s), 0 warning(s)
Code:#include <stdio.h> struct Common { char *name; int age; }; void pass(struct Common *pPC); int main(void) { struct Common PC; PC.name = "Phil"; PC.age = 23; pass(&PC); printf("%s", PC.name); printf("%d", PC.age); return 0; } void pass(struct Common *pPC) { pPC->name = "Dude"; pPC->age = 24; }



LinkBack URL
About LinkBacks


