首页 > 其他分享 >5.12

5.12

时间:2023-05-12 23:44:13浏览次数:36  
标签:daughter cout class son 5.12 mother public

#include<iostream>

using namespace std;

#include<string>

class mother {

public:

    mother()

    {

        cout << "mother\n";

    }

};

class daughter : public mother {

public:

    daughter()

    {

        cout << "daughter\n";

    }

};

class son : public mother {

public:

    son()

    {

        cout << "son\n";

    }

};

int main()

{

    daughter cynthia;

    son daniel;

    return 0;

}

 

标签:daughter,cout,class,son,5.12,mother,public
From: https://www.cnblogs.com/lml66/p/17396561.html

相关文章

  • 2023.5.12——软件工程日报
    所花时间(包括上课):6h代码量(行):0行博客量(篇):1篇今天,上午学习,下午学习。我了解到的知识点:1.了解了一些数据库的知识;2.了解了一些python的知识;3.了解了一些英语知识;5.了解了一些Javaweb的知识;4.了解了一些数学建模的知识;6.了解了一些计算机网络的知识;......
  • day71(2023.5.12)
    1.JavaEE简介 2.服务器 3.Tomcat的使用 4.Tomcat下载与安装 5.Tomcat目录结构与介绍 6.Tomcat启动与关闭输入后,小猫出来啦! 7.Tomcat配置文件介绍 8.解决控制台乱码以及修改Tomcat监听端口 9.配置TomcatManage......
  • 5.12
    1#include<iostream>2usingnamespacestd;34template<classT>5classmypair{6Ta,b;7public:8mypair(Tfirst,Tsecond)9{10a=first;11b=second;12}13Tgetmax();14};1516......
  • 5.12 强制转换函数重载
    在 C++ 中,类型的名字(包括类的名字)本身也是一种运算符,即类型强制转换运算符。类型强制转换运算符是单目运算符,也可以被重载,但只能重载为成员函数,不能重载为全局函数。经过适当重载后,(类型名)对象这个对对象进行强制类型转换的表达式就等价于对象.operator类型名(),即变成对运算符......
  • 编程一小时2023.5.12
    #include<iostream>#include<cstring>#include<algorithm>#include<vector>#include<unordered_set>#pragmaGCCoptimize(2)#pragmaGCCoptimize(3)#definelfirst#definersecondusingnamespacestd;typedefpair<int,int>......
  • 每日总结-23.5.12
    <%HttpSessionhttpSession=request.getSession();//Stringtea_id=(String)httpSession.getAttribute("id_");Stringtea_id=request.getParameter("id_");Thesqlthesql=newThesql();request.setCharacterEncoding(......
  • 2023.5.12每日总结
    packageshiyan;importjava.sql.*;importjava.text.ParseException;importjava.text.SimpleDateFormat;importjava.util.Date;publicclassAllMethods{publicConnectionconnect;publicAllMethods()throwsException{Class.forName(&q......
  • 5.12每日总结
    <%@pagelanguage="java"contentType="text/html;charset=UTF-8"pageEncoding="UTF-8"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDHTML4.01Transitional//EN""http://www.w3.org/TR/html4/loose.dtd&qu......
  • 每日总结 5.12
    今日进行了web实验。对于之前所学习的增删改查进行熟练学习。1)    开MySQL,新建一个数据库。2)    新建一个数据库表。3)    在表中增加若干记录,作为初始数据。4)    打开Eclipse软件,新建一个名为Lab03的Web项目,并设置其部署程序为Tomcat。5)    在......
  • 5.12每日总结
    今天学习了nextInt、nextFloat、nextDoublenext():用于读取String字符串数组,以空格划分(只读取输入直到空格),在读取后将光标指向本行nextLine():用于读取String字符串数组,读取包括单词之间的空格和除回车以外的所有符号,在读取后将光标指向下一行publicstaticvoidmain(String[]arg......