5:44

17 views
Skip to first unread message

abaa...@hotmail.com

unread,
Apr 23, 2023, 2:39:21 PM4/23/23
to noc23-cs5...@nptel.iitm.ac.in
Hi,

I have a question about what is happening in this video at 00:05:44 -

http://www.youtube.com/watch?v=D0pRg88RWhQ#t=344s.

Please could you clarify why you were able to initialize the complex object 'c' using the initializer list with public data, public method but were unable to do so using private data, public method..

Thanks!



Reference Key - Key('StudentQuestionEntity', 6289903306932224, namespace='ns_noc23_cs50')

soumen paul

unread,
Apr 26, 2023, 2:21:08 AM4/26/23
to Discussion forum for Programming in Modern C++, abaa...@hotmail.com
Brace initialization parameter list will not work if the data members are declared private.

An Anubha

unread,
Apr 26, 2023, 4:48:48 AM4/26/23
to soumen paul, Discussion forum for Programming in Modern C++
Thanks so much for your clarification.

From: soumen paul <soumen...@gmail.com>
Sent: Wednesday, April 26, 2023 7:21:07 AM
To: Discussion forum for Programming in Modern C++ <noc23-cs5...@nptel.iitm.ac.in>
Cc: abaa...@hotmail.com <abaa...@hotmail.com>
Subject: Re: 5:44
 
Reply all
Reply to author
Forward
0 new messages