- #1
neurocomp2003
- 1,366
- 4
Sup,
is there a purpose to declaring functions as FRIEND rather than as member functions of a class...types of functions I'm looking towards: Print Save Load.
I'm trying to organize my code(3D engine/neural nets) and I'm looking to put those above 3 functions in a separate namespace or as friends but i don't know if it is wise.
Is there a memory trade off to using FRIEND rather than just declaring the function in the class as normally would.
Is there a computational trade off?
Are FRIENDs bad in general(not as apart of OO design)?
thx
Neurocomp
is there a purpose to declaring functions as FRIEND rather than as member functions of a class...types of functions I'm looking towards: Print Save Load.
I'm trying to organize my code(3D engine/neural nets) and I'm looking to put those above 3 functions in a separate namespace or as friends but i don't know if it is wise.
Is there a memory trade off to using FRIEND rather than just declaring the function in the class as normally would.
Is there a computational trade off?
Are FRIENDs bad in general(not as apart of OO design)?
thx
Neurocomp