//**** Build of configuration Debug for project Calculator ****
**** Internal Builder is used for build ****
g++ -O0 -g3 -Wall -c -fmessage-length=0 -o src\Calculator.o ..\src\Calculator.cpp
..\src\/Calculator.h: In function 'std::ostream& operator<<(std::ostream&, CComplex)':
..\src\/Calculator.h:38:9: error: 'float CComplex::m_imaginary' is private
..\src\Calculator.cpp:79:8: error: within this context
..\src\/Calculator.h:37:9: error: 'float CComplex::m_real' is private
..\src\Calculator.cpp:81:12: error: within this context
..\src\/Calculator.h:38:9: error: 'float CComplex::m_imaginary' is private
..\src\Calculator.cpp:81:31: error: within this context
..\src\/Calculator.h:37:9: error: 'float CComplex::m_real' is private
..\src\Calculator.cpp:85:12: error: within this context
..\src\/Calculator.h:38:9: error: 'float CComplex::m_imaginary' is private
..\src\Calculator.cpp:85:31: error: within this context
Build error occurred, build is stopped
Time consumed: 687 ms.
任何人都可以幫助我 - 我試圖訪問不接受訪問的私人功能。無法訪問私人功能
那麼,爲什麼你想要訪問一個私人功能?以上看起來完全是預期的 –