求c答案,題目如下,求C答案,題目如下

2021-03-03 20:57:18 字數 3602 閱讀 4195

1樓:匿名使用者

#ifndef _manage_person_base_h_

#define _manage_person_base_h_

#include

using std::string;

class cmangepersonbase

virtual float getbasepay(void) = 0;

virtual std::string gettechnicalpost(void) = 0;

virtual std::string getname(void) = 0;

virtual std::string getemployeenumber(void) = 0;

protected:

std::string m_stechnicalpost;

std::string m_sname;

std::string m_semployeenumber;

float m_fbasepay;

};#endif // manageperson.h

#ifndef _chairman_h_

#define _chairman_h_

#include "managepersonbase.h"

class cchairman : virtual public cmangepersonbase

virtual float getbasepay(void)

virtual std::string gettechnicalpost(void)

virtual std::string getname(void)

virtual std::string getemployeenumber(void)

virtual int getmanageclassnumber(void)

protected:

int m_nmanageclassnumber;

};#endif // chairman.h

#ifndef _teacher_h_

#define _teacher_h_

#include "managepersonbase.h"

class cteacher : virtual public cmangepersonbase

virtual float getbasepay(void)

virtual std::string gettechnicalpost(void)

virtual std::string getname(void)

virtual std::string getemployeenumber(void)

virtual int getmonthteachernumber(void)

protected:

int m_nmonthteachernumber;

};#endif // teacher.h

#ifndef _teacher_chairman_h_

#define _teacher_chairman_h_

#include "teacher.h"

#include "chairman.h"

class cteacherchairman : public cteacher,public cchairman

virtual float getbasepay(void)

virtual string gettechnicalpost(void)

virtual string getname(void)

virtual string getemployeenumber(void)

virtual int getmonthteachernumber(void)

virtual int getmanageclassnumber(void)

};#endif // teacherchairman.h

// person.cpp : 定義控制檯應用程式的入口點。

//#include "stdafx.h"

#include

#include "teacher.h"

#include "chairman.h"

#include "teacherchairman.h"

int main(int argc, _tchar* argv)

一道c++題求答案和分析,題目如下

2樓:匿名使用者

選a從afunc( ) 返回出來的值是一個位元組.

3樓:

uc和ul有什麼區別嗎?

沒區別的話,就是d了

求解c++實驗題,我想要的答案是:直接複製下來在c++裡面能直接執行的。2個題目如下。緊急請幫幫!

4樓:匿名使用者

//1#include

#define pi 3.1415926

class shape

;virtual ~shape(){};

};class circle:public shapevirtual ~circle(){};

double calculatearea()private:

int m_radius;

};class rectangle

virtual ~rectangle(){};

double calculatearea()private:

int m_width,m_height;

};int main(int argc, char *argv);virtual ~shape(){};

virtual double calculatearea()=0;

virtual double calculateperim()=0;

};class circle:public shapevirtual ~circle(){};

double calculatearea()double calculateperim()private:

int m_radius;

};class rectangle

virtual ~rectangle(){};

double calculatearea()double calculateperim()private:

int m_width,m_height;

};class square:public shape~square(){};

double calculatearea()double calculateperim()private:

int m_edge;

};class laddershape:public shapevirtual ~laddershape(){};

double calculatearea()double calculateperim()private:

int m_up,m_down,m_height,m_left,m_right;

};int main(int argc, char *argv)

5樓:匿名使用者

這不是c 程式設計教程的章節練習題嗎

求C語言答案,求C語言答案

17 設變數a是整型,f是實型,i是雙精度型,則表示式 10 a i f 的值的資料型別為 c a int b float c double d 不確定 18 邏輯運算子兩側運算物件的資料型別。d a 只能是0或1 b 只能是0或非0正數 c 只能是整型或字元型資料 d 可以是任何型別的資料 19 ...

c語言題目,求詳細解答,c語言題目,求詳細解答步驟,謝謝。

x x 0 x 0 x 10 x 10 x 20 分解為x x x x 這樣就比較清楚了 c語言題目,求詳細解答步驟,謝謝。x 5,y 10,呼叫fun時,開設臨時變數x和臨時變數y,與主程式中並非同一變數,因此內可以寫成 void fun int xx,int yy fun xx 5,yy指向y,...

一道C語言題目,求答案!謝謝,求助求助,一道C語言填空題,求答案謝謝謝謝大佬

include int main void printf lf sum return 0 以下 來可完成題設要求 include stdafx.h if the vc 6.0,with this line.include stdio.h int main void 好奇自怪啊!誰這麼寫了?好意思投訴...