Home > Back-end >  Brother, sisters, save the children
Brother, sisters, save the children

Time:10-11



This change how, crack, be badly in need of help

CodePudding user response:

The char * into a string

CodePudding user response:

All, or only the cin into a string

CodePudding user response:

reference 1/f, Michael amin's reply:
change char * string

All, or only the cin into a string

CodePudding user response:

reference m0_46482279 reply: 3/f
Quote: reference 1/f, Michael amin's reply:
change the char * to string

All of it, or just change the cin to string


All change, you stick to come over

CodePudding user response:

reference 4 floor Michael amin's reply:
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

#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

CodePudding user response:

reference 5 floor m0_46482279 reply:
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
 # 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;
}


Well, the constructor to write wrong

CodePudding user response:

SetInfo, spelling errors, an e

CodePudding user response:

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

CodePudding user response:

refer to the eighth floor m0_46482279 response:
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


Come on! I was a career change

CodePudding user response:

Haven't turn, in the study

CodePudding user response:

references to the tenth floor, Michael amin's reply:
can not turn, in the study of

Well, come on, I continue to the next level of design