I am soon going to be teaching some OOP concepts at College, unfortunatly I must use Borland C++ (4.5), can anyone help with a translatikon of how this relates to Delphi, so I can get a better understanding of whats going on.
C++ has 'friend' declaration, looks a bit like a 'public' declaration in Delphi.
The info I have is
the example I have looks like this
Is there some sort of pre declaration going on here (because C is low level rubbish) or what.
Please, no-one suggest the C++ forum, been there, dont want to go again.
Steve: N.M.N.F.
If something is popular, it must be wrong: Mark Twain
C++ has 'friend' declaration, looks a bit like a 'public' declaration in Delphi.
The info I have is
Public right?A Friend functionm is a non-member function which is allowed access to the private data
the example I have looks like this
Code:
class Complex
{
// list of friend functions
friend float add_real(Complex&, Complex&);
private
float, real, imag;
public
Complex(float,float);
}
Please, no-one suggest the C++ forum, been there, dont want to go again.
Steve: N.M.N.F.
If something is popular, it must be wrong: Mark Twain