When compiling and linking read the error messages carefully.
Anikan1297 wrote:
error LNK2019: unresolved external symbol "void __cdecl WriteToFile(void)"
(?WriteToFile@@YAXXZ) referenced in function "void __cdecl addContact(void)"
This tells you all you need to know. You are missing void WriteToFile(void). You are missing it because it was called in void addContact(void) and there is no implementation for it in your code.
Anikan1297 wrote:
C:\Users\Anikan\Documents\Visual Studio
2010\Projects\ContactBook\Debug\ContactBook.exe : fatal error LNK1120: 1
unresolved externals".
This now says that the link failed because of one unresolved external. Of course.
If you add:
void WriteToFile(void)
{
}
the program will link.
It will not work properly until you insert the intended code into the body of this function.