R
Ryan D. Lucey
ok I'm trying out a small program using operator overloading from the book
C++ How To Program by Deitel Deitel. In their code they use the old style
headers
and the program compiles and runs as it should, but if I switch to the new
style headers and add 'using namespace std' and change nothing else
I get errors saying that the class object cannot access private data in the
class although the overloaded function is declared as a friend. It compiles
fine however if I add the .h extension to the headers <iostream> and
<iomanip>
What gives ?
Ryan
C++ How To Program by Deitel Deitel. In their code they use the old style
headers
and the program compiles and runs as it should, but if I switch to the new
style headers and add 'using namespace std' and change nothing else
I get errors saying that the class object cannot access private data in the
class although the overloaded function is declared as a friend. It compiles
fine however if I add the .h extension to the headers <iostream> and
<iomanip>
What gives ?
Ryan