Thread: ERROR
View Single Post
  #2   Spotlight this post!  
Unread 26-02-2005, 14:29
Alex1072 Alex1072 is offline
Registered User
AKA: Alex
#1072 (Harker Robotics Team)
Team Role: Leadership
 
Join Date: Jan 2003
Rookie Year: 2003
Location: San Jose
Posts: 110
Alex1072 is an unknown quantity at this point
Send a message via AIM to Alex1072 Send a message via Yahoo to Alex1072
Re: ERROR

There's nothing that I can see in your code that should be causing those errors. It would help if you posted the rest of the function.

EDIT: After looking at it again, it looks like you spelled reduction differently from how you declared it:

D:\Robot\MyFiles\user_routines.c:239:Error [1105] symbol 'redeuction' has not been defined

The symbol 'redeuction' has not been defined, only 'reduction' has been.

Also, for this error:
D:\Robot\MyFiles\user_routines.c:259:Error [1139] integer types required for bitwise XOR operator

the 'a^b' in C/C++/java is not actually a to the power of b. It's the XOR operator.

if you have two binary integers: a = 1011, b= 1101, a^b would be: 0110. XOR compares each binay digit of a with the corresponding digit of b. If the digits are different, a 1 is placed as the corresponding digit of the result, if they are the same, a 0 is placed.

If you need to do something like a^2, you should just do a*a. If you need actual exponentials then you have to use math.h or write your own function. If you use the c math library, pow(a, b) = a to the bth power.

EDIT #2: fixed the name of the power function
__________________
--------------------------------------
Alex
President
Team 1072 Harker Robotics

Last edited by Alex1072 : 26-02-2005 at 14:56.