//C++语言 通过构造函数初始化学生信息 #include "stdafx.h" #include <iostream> #include <string> using namespace std; /* class CStudent { private: char m_Name[10]; int m_Age; double m_Height; public: CStudent(char *name, int age, double height) { strcpy(m_Name, name); m_Age = age; m_Height = height; } void display() { cout << "name:" << m_Name << endl; co
C++语言 通过构造函数初始化学生信息
最新推荐文章于 2022-12-26 16:25:56 发布