A
Al-Burak
In the program
--- money.hpp
namespace jme{
class Money{
protected: float amount;
...
public: friend jme::Money jme:perator%( jme::Money&,
jme::Money&);
};
}
--- money.cpp
jme::Money jme:perator%(jme::Money& lhs, jme::Money& rhs){
jme::Money tmp;
return tmp = lhs.amount % rhs.amount;
}
I get an error message, that reads:
Project : Money
Compiler : GNU GCC Compiler (called directly)
Directory : c:\money\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: money.cpp
money.cpp: In function `jme::Money jme:perator%(jme::Money&,
jme::Money&)':
money.cpp:72: error: invalid operands of types `float' and `float' to
binary `operator
--- money.hpp
namespace jme{
class Money{
protected: float amount;
...
public: friend jme::Money jme:perator%( jme::Money&,
jme::Money&);
};
}
--- money.cpp
jme::Money jme:perator%(jme::Money& lhs, jme::Money& rhs){
jme::Money tmp;
return tmp = lhs.amount % rhs.amount;
}
I get an error message, that reads:
Project : Money
Compiler : GNU GCC Compiler (called directly)
Directory : c:\money\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: money.cpp
money.cpp: In function `jme::Money jme:perator%(jme::Money&,
jme::Money&)':
money.cpp:72: error: invalid operands of types `float' and `float' to
binary `operator