Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualJuliean

Posted 07 April 2013 - 03:14 PM

Here:

 

  // Prevent assignment:
  Dog& operator=(const Dog& rv);

This invalidates the assignement operator, so when you think you are doing "p = dh.p;", as in copying dh.p in p, you are instead doing virtuall nothing.

 

Word of advice, whether you c&p this or wrote it yourself, (ok, so you didn't write it, still:) this code could really need some spacing. Thats horrible to read, try to at least put a spacing between every function, wasn't the problem so obvious, it might have taken a while to find out why...


#3Juliean

Posted 07 April 2013 - 03:13 PM

Here:

 

  // Prevent assignment:
  Dog& operator=(const Dog& rv);

This invalidates the assignement operator, so when you think you are doing "p = dh.p;", as in copying dh.p in p, you are instead doing virtuall nothing.

 

Word of advice, whether you c&p this or wrote it yourself, this code could really need some spacing. Thats horrible to read, try to at least put a spacing between every function, wasn't the problem so obvious, it might have taken a while to find out why...


#2Juliean

Posted 07 April 2013 - 03:13 PM

Here:

 

  // Prevent assignment:
  Dog& operator=(const Dog& rv);

This invalidates the assignement operator, so when you think you are doing "p = dh.p;", as in copying dh.p in p, you are instead doing virtuall nothing.

 

Word of advice, whether you c&p this or wrote it yourself, this code could really need some spacing. Thats horrible to read, try to at least put a spacing between every function, wasn't the problem so obvious, it might have taken a while to find out why...


#1Juliean

Posted 07 April 2013 - 03:12 PM

Here:

 

  // Prevent assignment:
  Dog& operator=(const Dog& rv);

This invalidates the assignement operator, so when you think you are doing "p = dh.p;", as in copying dh.p in p, you are indeed doing virtuall nothing.

 

Word of advice, whether you c&p this or wrote it yourself, this code could really need some spacing. Thats horrible to read, try to at least put a spacing between every function, wasn't the problem so obvious, it might have taken a while to find out why...


PARTNERS