Please note that I understand that this topic is old and was written in 2004. I am having a similar issue with a few codes that I have written from a book's tutorial. The program has worked with an older compiler; I am currently using Visual Studio 2005 writting a C program and get the following errors:
error C2296: '&' : illegal, left operand has type 'const char [19]'
My code is as follows:
#include <stdio.h>
#include <conio.h>
int main()
{
int num1, num2;
printf("Enter two integers I will tell you the relationship they satisfy: \n");
scanf("%d%d", &num1,&num2);
if (num1 == num2)
printf( "%d is equal to %d\n" &num1, &num2 );
if (num1 != num2)
printf("%d is not equal to %d\n" &num1, &num2);
if (num1 > num2)
printf("%d is greater than %d\n" &num1, &num2);
if (num1 < num2)
printf("%d is less than %d\n" &num1, &num2);
if (num1 => num2)
printf("%d is greater than or equal to %d\n" &num1, &num2);
if (num1 =< num2)
printf("%d is less than or equal to %d\n" &num1, &num2);
getchar();
return 0;
}
Could someone please help?
Thanks