Modification in the function 'resize', using the dynamic memory allocation about the s_data.