을에서 const 캐스트 나는 함수로 선언했다 : (VS 2008 익스프레스)C/C++의 불확실성을
float** ppArr = new float*[5];
// Some initialization of ppArr
int result = myFunction(ppArr, 5, 128); <<<< Error
및 오류는 다음과 같습니다 :
int myFunction(const float** ppArr, const int n, const int m);
내가 그렇게처럼 호출 할 때
error C2664: 'Test_myFunction.cpp' : cannot convert parameter 1 from 'float **' to 'const float **'
WTF? 나는 float **을 const **로 캐스팅합니다. 아마도 그걸 잘못 해석 할 수 있을까요? :/
편집 : 엄청나게 빠른 응답에 감사드립니다! :)
이유를 설명하지 못합니다. –
@ David : 다른 답변으로 설명합니다. 난 그냥 게으른거야 : P – Nawaz