I am trying to set up a project in visual studios for C but every time i do, i first get this error message
fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
error LNK2005: _main already defined in clang.obj
I think the problem is that when you choose
Windows console application template, VS 2017 already generated a file which has a
int main() function defined in it.
Then you added another file
name.c which also has a
main() function. Thus you got that error.