1. ## function problem

Hi,
What is wrong with this function?

Code:
```float distance3(float 1px, float 1py, float 1pz, float 2px, float 2py,
float 2pz)
{
float dist = 0.0f;
float dist = sqrt(((2px - 1px)(2px - 1px)) + ((2py - 1py)(2py - 1py)) +
((2pz - 1pz)(2pz - 1pz)));
return dist;
}```
Error is:
error C2064: term does not evaluate to a function taking 1 arguments
Any help will be great. Thanks!

2. Did you #include <cmath> for sqrt()?

3. Doesn't
Code:
`((2px - 1px)(2px - 1px))`
need to be
Code:
`((2px - 1px)*(2px - 1px))`
?

4. hmm... yeah, I think rags_to_riches' diagnosis is more accurate.

5. Did you #include <cmath> for sqrt()?
Yes, I did..

Doesn't

Code:
((2px - 1px)(2px - 1px))need to be

Code:
((2px - 1px)*(2px - 1px))?
Thanks guys, I think that solved the problem..

6. Code:
`	float dist = 0.0f;`
Wouldn't that be a tad redundant when you declare another variable by the same name another line below?

--
Mats

7. Wouldn't that be a tad redundant when you declare another variable by the same name another line below?
Yes, I actually edited it. Thanks, matsp.

Code:
```float distance3(float 1px, float 1py, float 1pz, float 2px, float 2py,
float 2pz)
{
return sqrt(((2px - 1px)(2px - 1px)) + ((2py - 1py)(2py - 1py)) +
((2pz - 1pz)(2pz - 1pz)));
}```

8. What is "2px" even supposed to be? Variable names can't start with numbers.