anyone know hot to fix: error: invalid conversion from `const double (*)[3]' to `double (*)[3]'
what code are you having trouble with?
I would bet that you are modifying a constant pointer-to-array variable somewhere. But you need to let us see the code.
I have that happen all the times: u just gota change ur pointer.
Are you familiar with the const keyword and const pointers? If not, it's a good topic to read up on - const correctness can make your code safer and more reliable. const double * and double * are two different types that can't be cast between implicitly. In C, you should use an explicit cast like so: const double *src; double *dst; dst = (double*)src; In C++, you should use const_cast: dst = const_cast<double*>(src); Generally, if you're compiling C++, never use C-style casts. There's no compile-time or runtime checking, and they're relatively unsafe.
Join our real-time social learning platform and learn together with your friends!