user2007843
user2007843

Reputation: 609

identifier not found, even with argument-dependent lookup and operator << is ambiguous

In my C++ function, I am trying to do this cout <<getVoxelWidth(); but these are the 2 errors I am getting

error C2593: 'operator <<' is ambiguous and error C3861: 'getVoxelWidth': identifier not found, even with argument-dependent lookup

I have included the .h file that getVoxelWidth is located and here is how it is defined.

const double getVoxelWidth() const { return getVoxelDim("voxel_size_x"); }

Upvotes: 0

Views: 1053

Answers (1)

Balog Pal
Balog Pal

Reputation: 17163

Your signature implies a class function and you call it as it was a free function.

Probably you meant obj.getVoxelWidth(). After that the other error probably goes away or changes.

Upvotes: 4

Related Questions