Leo.peis
Leo.peis

Reputation: 14343

compiler error, c++

I am implementing an octree tree in c++ using visual studio. When i call the build function i get this error:

error C2664: 'BuildTree' : cannot convert parameter 5 from 'overloaded-function' to 'int' 1

this is the line that i get the error:

BuildTree(parent, 0.0 , 0.0, 0.0, length , maxLevel,0, 0.25);

and the function is this:

treeNode * BuildTree( treeNode * parent, float xx , float yy, float zz , int length ,int maxLevel,int val,float threshold)

Can anyone help me to correct this error?

Upvotes: 0

Views: 152

Answers (2)

Sylvain Defresne
Sylvain Defresne

Reputation: 44573

There is probably a function named length accessible in the current scope when you call the BuildTree function.

Upvotes: 4

ta.speot.is
ta.speot.is

Reputation: 27214

Is length a variable or a function name? Did you mean to call length()?

Upvotes: 1

Related Questions