Main Error:
Error LNK2019 unresolved external symbol _main referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ)
I have read so many different ones and tried it all with no luck. Could someone help please? I am not a dev, so any help would be really appreciated.
I have tried the linker resolution and several others.
#include <stdio.h>
#include <string.h>
void main()
{
printf("======================================================================");
printf("\n====================================================================");
char input[20];
int i,j;
puts("\n\nEnter the sentence to be reversed::\n");
gets(input);
printf("Input addr: %p\n", input);
printf("\nThe reversed sentence is:: \n\n");
strrev(input);
for(i=0; input[i]!='\0'; i++)
{
if(input[i+1]==' ' || input[i+1]==NULL)
{
for(j=i; j>=0 && input[j]!=' '; j--)
printf("%c",input[j]);
}
else
continue;
printf(" ");
}
getch();
}