Time:10-11
CodePudding user response:
change char * string
Quote: reference 1/f, Michael amin's reply: change the char * to string All of it, or just change the cin to string
change the char * to string
Quote: refer to the third floor m0_46482279 response: Quote: reference 1/f, Michael amin's reply: change char * string All of it, or just change the cin to string Pressed under all change, you
Quote: reference 1/f, Michael amin's reply: change char * string All of it, or just change the cin to string
Quote: refer to 4th floor, Michael amin's reply: Quote: reference m0_46482279 reply: 3/f Quote: reference 1/f, Michael amin's reply: change char * string All of it, or just change the cin to string Pressed under all change, you #include using namespace std; The class StInfo {Public: Int SID. String Name; The string Class. Void SetInfo (int the sid, string name, string cla, string phone); Void PrintInfo (); Private: String Phone; }; Void StInfo: : SetInfo (int the sid, string name, string cla, string phone) {Cin> SID. Cin> The Name; Cin> Class; Cin> The Phone; } Void StInfo: : PrintInfo () {cout} After all it is
Quote: reference m0_46482279 reply: 3/f Quote: reference 1/f, Michael amin's reply: change char * string All of it, or just change the cin to string Pressed under all change, you
# include #include using namespace std; The class StInfo {Public: Int SID. String Name; The string Class. StInfo (int the sid, string name, string cla, string phone) {SID=SID; Name=Name; Class=cla. Phone=Phone; } Void PrintInfo (); Private: String Phone; }; Void StInfo: : PrintInfo () {cout} Int main () {StInfo s (1, "Michael", "class of 2020", "10086"); Supachai panitchpakdi rintInfo (); return 0; }
SetInfo, spelling errors, one more e
Quote: refer to 7th floor Michael amin's reply: SetInfo, spelling errors, one more e Wow, finally, thank you very much, this year freshman year, turned professional, they learn c language, during the first half of this year to learning c + + feel good hard, this problem in some places are not quite understand, really thank you very much
can not turn, in the study of
Page link:https//www.codepudding.com/Backend/62169.html