For the way that you defined your struct str_info, you also need to implement operator=. However, I would suggest that you use a vector as the occ_pos member, and don't bother with either the copy constructor or assignment operator. If all the members of your str_info struct support assignment and copy constructor, you won't need to implement these. Best regards, John