Help me, Error POO | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
14th Jul 2020, 8:36 PM
TheArturs
TheArturs - avatar
2 Answers
+ 1
You need to provide more information about what you need help with.
14th Jul 2020, 8:56 PM
benjamin
0
Public attributes, will be three strings: that corresponds to the name, maternal surname and surname maternal Methods: • Constructor, in this method, receives three strings to initialize the attributes name, paternal and maternal, respectively • copy (): empty, in this method the name string is copied to a new string (local variable), to store the full name, the sytrcpy () function from the string library is used. Later it is shared with the method add (). • add (char *): empty, in this method it receives with a parameter step by value, a copy of the string that has storing the name and that in this method, through the function strcat (), the paternal surname will be concatenated and maternal leaving a space between each one, in said local variable. Later it is shared with the method tell () • count (char *) null; in this method a copy of the string that has Stored the name and its two last names, to count the number of characters that this string has, a local variable and the strlen () function; Finally
14th Jul 2020, 9:04 PM
TheArturs
TheArturs - avatar