I’m making a texture classifier in OpenCV and VS2008 and I want to insert 3 double variables into a double array so I can calculate nearest neighbours of the arrays.
I tried :
double a[5]={x,y,z};
and the output is 0012FF04
the same output happens when I just declare an array with a couple of numbers in it like
double:
b[2]={1.0,2.3};
And finally when I tried to declare the array long double it went into debug and gave me an exception and the console output was: 0012FED4OpenCV Error:Bad flag <parameter or structure field> <Unrecognized or unsupported array type> in unknown function, file .\cxarray.cpp, line 2470.
If anyone could help me I would be very grateful.
C++ doesn’t define an
operator<<(double*)that displays the contents of an array; C++ arrays aren’t self-describing and I don’t believe defining such an operator in a generally-useful way would be possible. You have to write an explicit loop: