Missing " )" before "-"

I haven't written C++ code in a while can you tell me what the problem with his bit of code?

 
 int y = (((10 * Free_Space_Path_Loss) – 32.44) – 20 * (log(10)) * (f / 20));
Not sure exactly on your error probably something small you could put a couple lines in between each thing to check also you may want to use a double instead of an int since you are working with fp numbers.
lol so this was blowing my mind and after investigating I found your subtraction operators are funny, trolling? good one if so.. try copy paste my declare and it works:

double j = (((10 * fspl) - 32.44) - 20 * (log(10)) * (f / 20));

copy n paste yours

int y = (((10 * Free_Space_Path_Loss) – 32.44) – 20 * (log(10)) * (f / 20));
Last edited on
You are missing a parenthesis after log(10). You should put the calculation onto multiple lines to make it easier to see.
Nope, He was trolling..That is why I couldn't figure it out either...
Copy and paste the Subtraction he used then the normal one...He needs a life

His

Normal
-


Ps it only shows the difference in quote looks the same in ouput and code tags. I reliazed the difference when I put it in the browser.
Last edited on
Oh, I see. But he is missing a parenthesis after log(10). Report him if he is indeed a troll.
He is and he has the parenthesis after f/20
I haven't written C++ code in a while can you tell me what the problem with his bit of code?


int y = (((10 * Free_Space_Path_Loss) – 32.44) – 20 * (log(10)) * (f / 20));


EDIT - woah when did they fix the report button?
Last edited on
Aren't you guys overreacting a bit? Maybe he's using some exotic keyboard layout that inserts en dashes instead of proper ASCII dashes.
Topic archived. No new replies allowed.