建立乙個Client類

2021-10-03 08:00:27 字數 454 閱讀 6005

建立乙個client類

要求:(1)包含有字元型指標成員m_name(姓名),整型成員m_age(年齡)

(2)包含乙個帶引數的建構函式用來初始化每個資料成員

(3)包含乙個析構函式

(4)包含乙個顯示函式display()

(5) 主函式中,接收鍵盤輸入的客戶資訊,根據輸入建立物件並且輸出客戶資訊。

#include

#include

using

namespace std;

char

*getname()

;class

client

void

display()

~client()

;};int

main()

char

*getname()

建立乙個類

c 是一門物件導向的程式語言,而物件導向的基礎就是類 使用c 建立乙個student類 class student 學生類 輸出學生的資訊 void outputstudent void void student input char name,int age,int no void student...

建立乙個CTabView類

標頭檔案 pragma once ctabview class ctabview public cctrlview 原始檔 include stdafx.h include tabview.h ctabview implement dyncreate ctabview,cctrlview ctabv...

建立乙個Date類

標頭檔案 1 data class.h ifndef i date ed define i date ed include include using namespace std year應當是1800到2200之間的整數 month必須是1到12之間的整數 day必須是1到給定 月的天數之間的整數...