#include <iostream>#include <cstdlib>using namespace std;struct student{ int age; int so

#include 
#include 
using namespace std;
struct student
{
    int age;
    int sorce;
    string sex;
    void fun();
    void set_name(string name1)
    {
        name=name1;
 
  
    }
private:
    string name;
};
void student::fun()
{
    cout< 
  
    cout< 
  
    cout< 
  
    cout< 
  
 
  
}
 
  
 
  
int main()
{
          student a;
          a.age=22;
          a.sex="男";
          a.sorce=75;
          a.set_name("方建");
          a.fun();
 
  
 
  
 
  
 
  
 
  
    return 0;
}
 
 

你可能感兴趣的:(c++,算法,开发语言)