- 博客(5)
- 收藏
- 关注
原创 C++编程
*作用:**函数名可以相同,提高复用性同一个作用域下函数名称相同函数参数类型不同或者个数不同或者顺序不同函数的返回值不可以作为函数重载的条件//函数重载需要函数都在同一个作用域下cout << "func 的调用!" << endl;cout << "func (int a) 的调用!" << endl;cout << "func (double a)的调用!" << endl;cout << "func (int a ,double b) 的调用!" << endl;
2024-10-21 20:52:37
1017
1
原创 C# 编程题
C#编程题1. 猜字游戏using System;using System.Collections.Generic;using System.Text;namespace program1{ class Program { static void Main(string[] args) { ...
2020-04-22 17:56:33
2363
原创 C++ 继承与派生编程题
C++ 继承与派生—笔记1. 编写一个程序,其中有一个汽车类Vehicle,它具有一个需要传递参数的构造函数,类中的数据成员:车轮个数wheels和车重weight为保护属性;小车类Car是它的私有派生类,其中包含载人数passager_load;卡车类Truck是Vehicle的私有派生类,其中包含载人数passager_load和载重量payload。每个类都有相关数据的输出方法。#in...
2020-03-25 15:00:42
4092
原创 C++,C#写猜数字游戏
小白第一次写,不喜勿喷,有些内容从网上借鉴,仅供参考。·C++写猜数字游戏:#include<stdio.h>#include<stdlib.h>#include<time.h>int main(){ srand((unsigned)time(NULL));//随机一个数字 char num,enter; int input; int m ...
2020-03-09 15:22:18
526
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人