Hi -i've started using netbeans and compiling in it recently and I'm not sure what the problem is here. Not sure if it isn't reading the Element.cpp/.h files while building/running the main.cpp
In my main:
Element a, b(5);
cout<<(5+b)<< endl;
Then in the .h:
Element operator+(const Element&obj);
And in the element.cpp:
Element Element::operator+(const Element&obj){
return Element(defaultArgument + obj.defaultArgument);
}
defaultArgument is a double variable just so btw!
The error states: error: no match for 'operator+' in '5 + b' - maybe just something small. Bit rusty with c++ atm.