KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Possible Duplicate: How are C array members handled in copy control functions? If I don't override the operator = of a class, it will use default memberwise assignment. But what does it mean? struct A { int array[100]; }; A a; A b=a; No error. How does b copes a 's array ? Normally array_b = array_a is invalid. Another exampe: struct A { vector<int> vec; }; A a; A b=a; How does b copes a 's vec ? Through assignment( vec_b = vec_a ), constructor( vec_b = vector<int>(vec_a) ) or other mystery way?
Tags (comma-separated)
Save Edits
Cancel