View Single Post
Join Date: Jul 2008
Posts: 2,001
Reputation: ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of 
Solved Threads: 343
ArkM's Avatar
ArkM ArkM is offline Offline
Postaholic

Re: Problem with constructor

 
0
  #3
Nov 9th, 2008
  1. void setDateMenu(Date myDate);
You pass Date by value so set a new date to Date copy. The original object is intact.
Pass by reference:
  1. void setDateMenu(Date& myDate);
Common error...
I hope now you know that argument passed by value in C and C++ ...
Reply With Quote