Friend fuctions

Calling and implementing friend fuctions

Page 1 of 1

2 Replies - 884 Views - Last Post: 07 March 2007 - 09:29 PM Rate Topic: -----

#1 afrothunderahs  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 07-March 07

Friend fuctions

Posted 07 March 2007 - 05:19 PM

// Friend comparison operators
  friend bool operator  <(const myfloat& a, const myfloat& B); 
  friend bool operator  >(const myfloat& a, const myfloat& B); 
  friend bool operator <=(const myfloat& a, const myfloat& B); 
  friend bool operator >=(const myfloat& a, const myfloat& B); 
  friend bool operator ==(const myfloat& a, const myfloat& B); 
  friend bool operator !=(const myfloat& a, const myfloat& B); 

trying to figure out the right way to code this segment of my program

Is This A Good Question/Topic? 0
  • +

Replies To: Friend fuctions

#2 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,506
  • Joined: 12-July 02

Re: Friend fuctions

Posted 07 March 2007 - 05:53 PM

Can you elaborate a little?
Was This Post Helpful? 0
  • +
  • -

#3 Xing  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 19
  • View blog
  • Posts: 725
  • Joined: 22-July 06

Re: Friend fuctions

Posted 07 March 2007 - 09:29 PM

View Postafrothunderahs, on 8 Mar, 2007 - 05:49 AM, said:

// Friend comparison operators
  friend bool operator  <(const myfloat& a, const myfloat& B); 
  friend bool operator  >(const myfloat& a, const myfloat& B); 
  friend bool operator <=(const myfloat& a, const myfloat& B); 
  friend bool operator >=(const myfloat& a, const myfloat& B); 
  friend bool operator ==(const myfloat& a, const myfloat& B); 
  friend bool operator !=(const myfloat& a, const myfloat& B); 

trying to figure out the right way to code this segment of my program


What have you figured out till now?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1