
游戏
c_of_begin
这个作者很懒,什么都没留下…
展开
-
马里奥(附代码windows)
不好意思让大家久等了代码如下:#include <bits/stdc++.h>#include <conio.h>#include <windows.h>#define high 20#define length 500using namespace std;int row=19,line=2,a[high][length]={0};void get_new(void);//开始新游戏 void SetTitle(LPCSTR lpTitle)原创 2022-03-19 19:29:25 · 9725 阅读 · 7 评论 -
c++读入不同类型的两个数并计算加减乘除
大家在编c++程序时有没有想过在c++中实现不同类型的数实现加减乘除?今天就用c++11里的auto和decltype来实现!一,计算两个未知类型的数的加减乘除 我们可以利用 auto 关键字将返回类型后置template<typename PLL,typename MSD>auto Plus(PLL a,MSD b) -> decltype(a+b){//拖尾返回类型:auto (name)() -> decltype() retu...原创 2021-08-26 16:39:08 · 2127 阅读 · 0 评论 -
C++马里奥(附代码)
这个代码要在linux环境下运行,过几天在上windows的 ,请大家多多支持,谢谢!好,话不多说,上代码!#include <termio.h>#include <unistd.h>#include <bits/stdc++.h>using namespace std;int row,line,answer,row2,line2,point=0;time_t start=0,finish=0;bool secret=false;char a[80][原创 2021-08-25 20:49:52 · 13819 阅读 · 6 评论 -
C++飞机大战(注释较多,新手可读懂,附全代码)
学了c++,总想用c++写点东西,便想到了飞机大战,话不多说,直接开始写!!一,头文件的问题 这个不用多说~直接上代码#include <iostream>//可以用bits/stdc++.h替代 #include <stdlib.h>//要用到system(),可以用bits/stdc++.h替代 #include <ctime>//要用到srand()和time(),可以用bits/stdc++.h替代 #includ...原创 2021-08-25 20:33:54 · 15300 阅读 · 14 评论