Why am I getting an error converting a ‘float**’ to ‘const float**’?
c++, const-correctness
Solution
See Why am I getting an error converting a Foo** → const Foo**?
Because converting `Foo**` → `const Foo**` would be invalid and dangerous ... The reason the conversion from `Foo**` → `const Foo**` is dangerous is that it would let you silently and accidentally modify a const Foo object without a cast
The reference goes on to give an example of how such an implicit conversion could allow me one to modify a `const` object without a cast.
Problem
I have a function that receives `float**` as an argument, and I tried to change it to take `const float**`. The compiler (`g++`) didn't like it and issued : `invalid conversion from ‘float**’ to ‘const float**’` this makes no sense to me, I know (and verified) that I can pass `char*` to a function that takes `const char*`, so why not with `const float**`?