2010-11-14 09:58 PM
error: invalid operands to binary * (have 'u8 *' and 'double')
2011-05-17 05:14 AM
Obviously you need to show how the variables are declared (what type are they?) for anyone to be able to help. You also need to indicate what build/compiler tools you are using. Try not to post a single line of code as an example -- post at least the entire function that the code is in.
2011-05-17 05:14 AM
Yes, in general it's not going to be possible to answer a question from just a single line of code given entilerly out of context!
You need to give sufficient context for the question to be meaninfgul - which means that it must show the declarations/definitions of all symbols involved. And it is usually necessary to know what toolset and version is being used. But, in this case, I think the answer should be obvious just from reading the error message:error: invalid operands to binary * (have 'u8 *' and 'double')
The ''binary *'' operator in 'C' is the multiplication operator - isn't it? So the message is saying that you are trying to multiply something of type 'u8*' by something of type 'double'
Now, the type 'u8*' is a pointer, isn't it? And the type 'double' is a floating point. What kind of result were you expecting from multiplying a pointer by a floating point number...??!