Here is some very simple code, which will not compile, can anyone tell me what the problem is and how to fix it?
#include <stdio.h>
int main()
{
float test;
test = 2;
test = test^5; /* This line is the problem */
printf("2^5 = %f\n", test);
return 0;
}
When I try to compile this using gcc I get the error:
test.c: In function 'main':
test.c:8: invalid operands to binary ^
Thankyou for helping