I just started learning C and trying to run the following code (given in the book I am using) in Code::Blocks 10.05 compiler for windows.
"error: too many arguments to function add_two_numbers ()"
#include <stdio.h>
int main()
{
int var1, var2;
int add_two_numbers ();
var1 = 1;
var2 = 53;
add_two_numbers (var1, var2);
add_two_numbers (1, 2);
exit(0);
}
add_two_numbers (int a, int b) /* Add a and b */
{
int c;
c = a + b;
printf ("%d\n", c);
}
Please advise.