Inserting commas using recursion

I am working on a program for class where I need to insert commas into a number using a recursive function. The program needs to take into account negative numbers. What I have so far in regards to the function is:

if(abs(n)<=999)

return n;

else

return Number(n-(n%1000)):

}

I need some direction as to how I submit a comma and if my program is flowing correctly. I tried to run it to try to get some idea as to what was going on but received "error LNK2001: unresolved external symbol_WinMain 16"