+ 1
What's wrong in copy constructor [solved]
Hi All I am trying to implement one good practice project our fellow community member has posted. It is yet half cooked. Please find below for same: https://code.sololearn.com/c1gCRHFwAaGG I am facing issue why s_s1.size() is not 2 from function tryString()?
2 Réponses
+ 3
Because you made m_intSize static.
s_s is clearing it from s_s1 as well when you call clear.
0
Thanks 😊... I just got concerned that my copy constructor is having issue and missed this class scope data member...