regardig vector

8 views
Skip to first unread message

jyothi...@gmail.com

unread,
Apr 24, 2023, 7:19:54 AM4/24/23
to noc23-cs5...@nptel.iitm.ac.in
Hi,

I have a question about what is happening in this video at 00:07:41 -

http://www.youtube.com/watch?v=V4uN6umvp0Y#t=461s.

here why do we initialize vector v object with pM->m? what is the meaning?.

Thanks!



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

soumen paul

unread,
Apr 26, 2023, 2:42:56 AM4/26/23
to Discussion forum for Programming in Modern C++, jyothi...@gmail.com
We need to pass the size of the vector during declaration. Hence, pM->m is an integer which will be the initial size of vector v.
Reply all
Reply to author
Forward
0 new messages