top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

C++: Why a copy constructor can not use pointer in place of reference variable ?

+1 vote
102 views
C++: Why a copy constructor can not use pointer in place of reference variable ?
posted Sep 9, 2016 by Neelam

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Hi Neelam,

Just to clear your doubt, pointer can be used in used for copy constructor but prefer to use reference variable since it is considered as constant pointer.

answer Sep 11, 2016 by Rupam
Thanks Rupam for your input. After posting this query, I wrote a copy constructor with pointer variable and it compiled successfully.
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...