C語(yǔ)言編一個(gè)數(shù)字益智小游戲
程序功能及運(yùn)行情況
設(shè)計(jì)的程序是一個(gè)數(shù)字益智游戲,旨在培養(yǎng)小朋友玩家的數(shù)學(xué)思維,提高玩家的數(shù)學(xué)能力。游戲共設(shè)有四個(gè)不同的小游戲,分別是一位數(shù)四則運(yùn)算、兩位數(shù)四則運(yùn)算、找最值游戲、排序游戲。程序能實(shí)現(xiàn)產(chǎn)生隨機(jī)題目,并能檢驗(yàn)玩家的作答是否正確。為了小朋友能感受到游戲的樂(lè)趣,特意設(shè)置了得分系統(tǒng),答對(duì)不同題目有不同的加分,并會(huì)根據(jù)總得分劃分不同「段位」,呈現(xiàn)給玩家。另外,程序還運(yùn)用了更加充滿活力的設(shè)計(jì),讓玩家愛(ài)上該游戲。
程序運(yùn)行截圖主菜單


運(yùn)算游戲


找最值游戲

排序游戲

得分統(tǒng)計(jì)

代碼部分頭文件區(qū)域
#include<stdio.h> #include<string.h> #include<stdlib.h> #include<time.h> #include<math.h> int score0 = 0; int u, z;
啟動(dòng)界面及主菜單
int main() //主函數(shù)游戲說(shuō)明
{
int menu();
char o;
printf("\n\n");
printf("\t= = = = = = = = = = = = = = = =\n");
printf("\t= 數(shù) 字 益 智 小 游 戲 =\n");
printf("\t= =\n");
printf("\t= 歡迎游玩該數(shù)字益智小游戲,游戲共設(shè)有 =\n");
printf("\t= 四個(gè)小游戲,其中『算』小游戲各設(shè)有四 =\n");
printf("\t= 個(gè)關(guān)卡。當(dāng)你挑戰(zhàn)難度越高的小游戲,并 =\n");
printf("\t= 挑戰(zhàn)成功,你將獲得更高的得分獎(jiǎng)勵(lì),最 =\n");
printf("\t= 終將根據(jù)你的總得分劃分你的游戲段位。 =\n");
printf("\t= =\n");
printf("\t= =\n");
printf("\t= * * * * * * * * * =\n");
printf("\t= * 游 戲 段 位 * =\n");
printf("\t= * 『青銅』 --- 5 分 以 下 * =\n");
printf("\t= * 『白銀』 --- 5 分 - 10 分 * =\n");
printf("\t= * 『黃金』 --- 10 分 - 15 分 * =\n");
printf("\t= * 『鉑金』 --- 15 分 - 20 分 * =\n");
printf("\t= * 『鉆石』 --- 20 分 - 25 分 * =\n");
printf("\t= * 『星耀』 --- 25 分 - 30 分 * =\n");
printf("\t= * 『王者』 --- 30 分 以 上 * =\n");
printf("\t= * * * * * * * * * =\n");
printf("\t= =\n");
printf("\t= 作 者 : Cowjiang =\n");
printf("\t= =\n");
printf("\t= = = = = = = = = = = = = = = =\n\n");
printf("\t 按回車鍵即可開(kāi)始游戲");
scanf_s("%c", &o, 1);
if (o == '\n') //輸入回車開(kāi)始游戲
{
system("cls");
menu();
}
else
exit(0);
}
int menu() //游戲主菜單函數(shù)
{
void one_arithmetic();
void two_arithmetic();
void comparation();
void maxmin();
int score();
int scores();
int scorep();
int o;
system("color 30");
printf("\n\n");
printf("\t ** \n");
printf("\t * * \n");
printf("\t * 主 菜 單 * \n");
printf("\t * * \n");
printf("\t* * * * * * * * * * * * * * * \n");
printf("\t * * \n");
printf("\t * 1.『 算 』一位數(shù)運(yùn)算 * \n");
printf("\t * 2.『 算 』兩位數(shù)運(yùn)算 * \n");
printf("\t * 3.『 找 』夾縫找最值 * \n");
printf("\t * 4.『 排 』排序比大小 * \n");
printf("\t * 5. 我 的 目 前 得 分 * \n");
printf("\t * 6. 退 出 益 智 游 戲 * \n");
printf("\t * * \n");
printf("\t * * * * * * * * * \n\n");
printf("\t 請(qǐng)輸入序號(hào)選擇:");
scanf_s("%d", &o);
if (o == 1)
{
one_arithmetic();
}
else if (o == 2)
{
two_arithmetic();
}
else if (o == 3)
{
maxmin();
}
else if (o == 4)
{
comparation();
}
else if (o == 5)
{
scorep();
}
else if (o == 6)
{
printf("\n\t\t= = = = = = = = = = = = = = = = =\n");
printf("\t\t= =\n");
printf("\t\t= 感謝你的游玩! =\n");
printf("\t\t= =\n");
printf("\t\t= = = = = = = = = = = = = = = = =\n");
exit(0);
}
else
{
printf("\n\t 你輸入的數(shù)字序號(hào)有誤噢,請(qǐng)重新選擇!\n");
system("pause");
system("cls");
menu();
}
}
得分統(tǒng)計(jì)
int scorep() //查看當(dāng)前得分
{
system("color F4");
z = score0;
system("cls");
printf("\n\n");
printf("\t\t * \n");
printf("\t\t * * \n");
printf("\t\t * * \n");
printf("\t\t* * * * * * * * \n");
printf("\t\t * 當(dāng)前得分: * \n");
printf("\t\t * %2d分 * \n", z);
printf("\t\t * * * * \n");
printf("\t\t * * * * \n");
if (z <= 5)
{
printf("\t\t ** [青 銅] ** \n");
printf("\t\t * * \n");
}
else if (z > 5 && z <= 10)
{
printf("\t\t ** [白 銀] ** \n");
printf("\t\t * * \n");
}
else if (z > 10 && z <= 15)
{
printf("\t\t ** [黃 金] ** \n");
printf("\t\t * * \n");
}
else if (z > 15 && z <= 20)
{
printf("\t\t ** [鉑 金] ** \n");
printf("\t\t * * \n");
}
else if (z > 20 && z <= 25)
{
printf("\t\t ** [鉆 石] ** \n");
printf("\t\t * * \n");
}
else if (z > 25 && z <= 30)
{
printf("\t\t ** [星 耀] ** \n");
printf("\t\t * * \n");
}
else if (z > 30)
{
printf("\t\t ** [王 者] ** \n");
printf("\t\t * * \n");
}
printf("\n\n\t 繼續(xù)游戲請(qǐng)輸入1,退出游戲請(qǐng)輸入2 :");
scanf_s("%d", &u);
if (u == 1) //返回主菜單
{
system("cls");
menu();
}
else if (u == 2) //退出游戲
{
printf("\n\t\t= = = = = = = = = = = = = = = = =\n");
printf("\t\t= =\n");
printf("\t\t= 感謝你的游玩! =\n");
printf("\t\t= =\n");
printf("\t\t= = = = = = = = = = = = = = = = =\n");
exit(0);
}
else
{
printf("\n\t 你輸入的數(shù)字序號(hào)有誤噢,返回主菜單!\n");
menu();
}
}
int score() //加分函數(shù)
{
score0++;
return score0;
}
int scores() //減分函數(shù)
{
score0--;
return score0;
}
一位數(shù)運(yùn)算
void one_arithmetic() //一位數(shù)運(yùn)算
{
int p, a, b, c, d, f, g, h, l, m;
float e;
srand(time(NULL));
a = rand() % 10;
b = rand() % 10;
g = rand() % 10;
h = rand() % 10;
system("color E0");
system("cls");
printf("\n\n\t\t * * * * * * * * \n"); //一位數(shù)運(yùn)算主菜單
printf("\t\t * * \n");
printf("\t\t * 1. [第一關(guān)] 加 法 * \n");
printf("\t\t * 2. [第二關(guān)] 減 法 * \n");
printf("\t\t * 3. [第三關(guān)] 乘 法 * \n");
printf("\t\t * 4. [第四關(guān)] 除 法 * \n");
printf("\t\t * 5. [進(jìn)階]混合運(yùn)算 * \n");
printf("\t\t * 6. [返 回] 主菜單 * \n");
printf("\t\t * * \n");
printf("\t\t * * * * * * * * \n");
printf("\t\t * * * \n");
printf("\t\t * * * \n");
printf("\t\t * * * * * \n");
printf("\t\t * * * \n");
printf("\t\t * \n");
printf("\t\t請(qǐng)輸入數(shù)字序號(hào)選擇挑戰(zhàn)關(guān)卡:");
scanf_s("%d", &p);
while (p == 1) //一位數(shù)加法
{
system("cls");
printf("\n\t%d + %d = ", a, b);
scanf_s("%d", &c);
if (c == a + b)
{
system("color AE");
printf("\n太棒了!挑戰(zhàn)成功,加 1 分!\n\n");
score();
system("pause");
}
else if (c != a + b)
{
system("color 4E");
printf("\n太可惜了!挑戰(zhàn)失敗,不要灰心噢!\n\n");
system("pause");
}
one_arithmetic();
}
while (p == 2) //一位數(shù)減法
{
system("cls");
if (a > b) //控制大數(shù)減小數(shù)
{
printf("\n\t%d - %d = ", a, b);
scanf_s("%d", &c);
if (c == a - b)
{
system("color AE");
printf("\n太棒了!挑戰(zhàn)成功,加 1 分!\n\n");
score();
system("pause");
}
else if (c != a - b)
{
system("color 4E");
printf("\n太可惜了!挑戰(zhàn)失敗,不要灰心噢!\n\n");
system("pause");
}
one_arithmetic();
}
else if (a < b)
{
system("cls");
printf("\n\t%d - %d = ", b, a);
scanf_s("%d", &c);
if (c == b - a)
{
system("color AE");
printf("\n太棒了!挑戰(zhàn)成功,加 1 分!\n\n");
score();
system("pause");
}
else if (c != b - a)
{
system("color 4E");
printf("\n\t太可惜了!挑戰(zhàn)失敗,不要灰心噢!\n\n");
system("pause");
}
one_arithmetic();
}
}
while (p == 3) //一位數(shù)乘法
{
system("cls");
printf("\n\t%d * %d = ", a, b);
scanf_s("%d", &c);
if (c == a * b)
{
system("color AE");
printf("\n太棒了!挑戰(zhàn)成功,加 1 分!\n\n");
score();
system("pause");
}
else if (c != a * b)
{
system("color 4E");
printf("\n\t\t太可惜了!挑戰(zhàn)失敗,不要灰心噢!\n\n");
system("pause");
}
one_arithmetic();
}
while (p == 4) //一位數(shù)除法
{
system("cls");
b = rand() % (9) + 1; //防止被除數(shù)為0
printf("\n\t(四舍五入保留整數(shù))%d除以%d等于", a, b);
scanf_s("%f", &e);
f = b / 2; //四舍五入
if (a % b <= f)
{
d = (int)(e);
if (d == a / b)
{
system("color AE");
printf("\n太棒了!挑戰(zhàn)成功,加 1 分!\n\n");
score();
system("pause");
}
else if (d != a / b)
{
system("color 4E");
printf("\n太可惜了!挑戰(zhàn)失敗,不要灰心噢!\n\n");
system("pause");
}
}
if (a % b > f)
{
d = (int)(e - 0.5);
if (d == a / b)
{
system("color AE");
printf("\n太棒了!挑戰(zhàn)成功,加 1 分!\n\n");
score();
system("pause");
}
else if (d != a / b)
{
system("color 4E");
printf("\n太可惜了!挑戰(zhàn)失敗,不要灰心噢!\n\n");
system("pause");
}
}
one_arithmetic();
}
while (p == 5) //一位數(shù)混合運(yùn)算
{
system("cls");
printf("\n\t%d + %d * ( %d - %d ) = ", a, b, g, h);
scanf_s("%d", &l);
m = a + b * (g - h);
if (l == m)
{
system("color AE");
printf("\n太棒了!挑戰(zhàn)成功,加 2 分!\n\n");
score();
score();
system("pause");
}
else if (l != m)
{
system("color 4E");
printf("\n太可惜了!挑戰(zhàn)失敗,不要灰心噢!\n\n");
system("pause");
}
one_arithmetic();
}
while (p == 6)
{
system("cls");
menu();
}
while (p < 1 || p > 6)
{
system("color 4E");
printf("\n\t\t輸入數(shù)字序號(hào)有誤噢,請(qǐng)重新輸入!\n\n");
system("pause");
one_arithmetic();
}
}
兩位數(shù)運(yùn)算
void two_arithmetic() //兩位數(shù)運(yùn)算
{
int p, a, b, c, d, f, g, h, l, m;
float e;
srand(time(NULL));
a = rand() % (90) + 10;
b = rand() % (90) + 10;
g = rand() % (90) + 10;
h = rand() % (90) + 10;
system("color B0");
system("cls");
printf("\n\n\t\t * * * * * * * * \n"); //兩位數(shù)運(yùn)算主菜單
printf("\t\t * * \n");
printf("\t\t * 1. [第一關(guān)] 加 法 * \n");
printf("\t\t * 2. [第二關(guān)] 減 法 * \n");
printf("\t\t * 3. [第三關(guān)] 乘 法 * \n");
printf("\t\t * 4. [第四關(guān)] 除 法 * \n");
printf("\t\t * 5. [進(jìn)階]混合運(yùn)算 * \n");
printf("\t\t * 6. [返 回] 主菜單 * \n");
printf("\t\t * * \n");
printf("\t\t * * * * * * * * \n");
printf("\t\t * * * \n");
printf("\t\t * * * \n");
printf("\t\t * * * * * \n");
printf("\t\t * * * \n");
printf("\t\t * \n");
printf("\t\t請(qǐng)輸入數(shù)字序號(hào)選擇挑戰(zhàn)關(guān)卡:");
scanf_s("%d", &p);
while (p == 1) //兩位數(shù)加法
{
system("cls");
printf("\n\t%d + %d = ", a, b);
scanf_s("%d", &c);
if (c == a + b)
{
system("color AE");
printf("\n太棒了!挑戰(zhàn)成功,加 1 分!\n\n");
score();
system("pause");
}
else if (c != a + b)
{
system("color 4B");
printf("\n太可惜了!挑戰(zhàn)失敗,不要灰心噢!\n\n");
system("pause");
}
two_arithmetic();
}
while (p == 2) //兩位數(shù)減法
{
if (a > b) //控制大數(shù)減小數(shù)
{
system("cls");
printf("\n\t%d - %d = ", a, b);
scanf_s("%d", &c);
if (c == a - b)
{
system("color AE");
printf("\n太棒了!挑戰(zhàn)成功,加 1 分!\n\n");
score();
system("pause");
}
else if (c != a - b)
{
system("color 4B");
printf("\n太可惜了!挑戰(zhàn)失敗,不要灰心噢!\n\n");
system("pause");
}
two_arithmetic();
}
else if (a < b)
{
system("cls");
printf("\n\t%d - %d = ", b, a);
scanf_s("%d", &c);
if (c == b - a)
{
system("color AE");
printf("\n太棒了!挑戰(zhàn)成功,加 1 分!\n\n");
score();
system("pause");
}
else if (c != b - a)
{
system("color 4B");
printf("\n太可惜了!挑戰(zhàn)失敗,不要灰心噢!\n\n");
system("pause");
}
two_arithmetic();
}
}
while (p == 3) //兩位數(shù)乘法
{
system("cls");
printf("\n\t%d * %d = ", a, b);
scanf_s("%d", &c);
if (c == a * b)
{
system("color AE");
printf("\n太棒了!挑戰(zhàn)成功,加 1 分!\n\n");
score();
system("pause");
}
else if (c != a * b)
{
system("color 4B");
printf("\n太可惜了!挑戰(zhàn)失敗,不要灰心噢!\n\n");
system("pause");
}
two_arithmetic();
}
while (p == 4) //兩位數(shù)除法
{
b = rand() % (9) + 1; //防止被除數(shù)為0
system("cls");
printf("\n\t(四舍五入保留整數(shù))%d除以%d等于", a, b);
scanf_s("%f", &e);
f = b / 2; //四舍五入
if (a % b <= f)
{
d = (int)(e);
if (d == a / b)
{
system("color AE");
printf("\n太棒了!挑戰(zhàn)成功,加 1 分!\n\n");
score();
system("pause");
}
else if (d != a / b)
{
system("color 4B");
printf("\n太可惜了!挑戰(zhàn)失敗,不要灰心噢!\n\n");
system("pause");
}
}
if (a % b > f)
{
d = (int)(e - 0.5);
if (d == a / b)
{
system("color AE");
printf("\n太棒了!挑戰(zhàn)成功,加 1 分!\n\n");
score();
system("pause");
}
else if (d != a / b)
{
system("color 4B");
printf("\n太可惜了!挑戰(zhàn)失敗,不要灰心噢!\n\n");
system("pause");
}
}
two_arithmetic();
}
while (p == 5) //兩位數(shù)混合運(yùn)算
{
system("cls");
printf("\n\t%d + %d * ( %d - %d ) = ", a, b, g, h);
scanf_s("%d", &l);
m = a + b * (g - h);
if (l == m)
{
system("color AE");
printf("\n太棒了!挑戰(zhàn)成功,加 2 分!\n\n");
score();
score();
system("pause");
}
else if (l != m)
{
system("color 4B");
printf("\n太可惜了!挑戰(zhàn)失敗,不要灰心噢!\n\n");
system("pause");
}
one_arithmetic();
}
while (p == 6)
{
system("cls");
menu();
}
while (p < 1 || p > 6)
{
system("color 4B");
printf("\n\t\t輸入數(shù)字序號(hào)有誤噢,請(qǐng)重新輸入!\n\n");
system("pause");
two_arithmetic();
}
}
排序游戲
void comparation() //排序游戲
{
int a[5], b[5];
int i, j, n, p, q;
srand(time(NULL));
for (i = 0; i < 5; i++)
a[i] = rand() % 10;
system("cls");
system("color 9F");
printf("\n\n\t* * * * * * * * * * * * * *\n"); //排序游戲規(guī)則
printf("\t* 游 戲 規(guī) 則 *\n");
printf("\t* 開(kāi)始游戲后將會(huì)顯示隨機(jī)五個(gè)整數(shù), *\n");
printf("\t* 請(qǐng)根據(jù)提示從小到大依次輸入排序后 *\n");
printf("\t* 的五個(gè)整數(shù),若排序正確即可獲得 3 *\n");
printf("\t* 分獎(jiǎng)勵(lì)。加油噢,你能行! *\n");
printf("\t* * * * * * * * * * * * * *\n");
printf("\t * * * \n");
printf("\t * * * \n");
printf("\t * * * * * \n");
printf("\t * * * \n");
printf("\t * \n");
printf("\t 輸入數(shù)字 0 即可開(kāi)始游戲:");
scanf_s("%d", &p);
if (p == 0)
printf("\n\n\t* * * * * * * * * * * * * *\n");
printf("\t* *\n");
printf("\t* ");
for (i = 0; i < 5; i++)
printf(" %d ", a[i]);
for (j = 0; j < 4; j++) //將數(shù)組從小到大排列
{
for (i = 0; i < 4 - j; i++)
{
if (a[i] > a[i + 1])
{
n = a[i];
a[i] = a[i + 1];
a[i + 1] = n;
}
}
}
printf(" *\n");
printf("\t* *\n");
printf("\t* * * * * * * * * * * * * *\n\n");
printf("接下來(lái),請(qǐng)從小到大輸入排序后的五個(gè)整數(shù)(用空格隔開(kāi)):");
for (i = 0; i < 5; i++)
scanf_s("%d", &b[i]);
for (i = 0; i < 5; i++) //驗(yàn)證回答正確與否
{
if (a[i] == b[i])
continue;
else
{
system("color 49");
printf("\n\t太可惜了,就差一點(diǎn)就成功了!再挑戰(zhàn)一次吧!\n\n");
system("pause");
comparation();
}
}
system("color AF");
printf("\n哇你太棒啦,挑戰(zhàn)成功!獲得 3 分獎(jiǎng)勵(lì)!\n\n");
score();
score();
score();
system("pause");
system("color 0F");
printf("\n\n想挑戰(zhàn)別的游戲嗎?\n\n");
printf("1. 挑戰(zhàn)其它游戲 ");
printf(" 2. 繼續(xù)挑戰(zhàn)排序游戲 ");
printf(" 3. 查看當(dāng)前得分\n\n");
printf("回復(fù)數(shù)字序號(hào)選擇一項(xiàng)吧:");
scanf_s("%d", &q);
if (q == 2)
{
system("cls");
comparation();
}
else if (q == 3)
scorep();
else
{
system("cls");
menu();
}
}
else //退出排序游戲?
{
system("color F0");
printf("\n\n想玩別的游戲嗎?\n\n");
printf("1. 挑戰(zhàn)其它游戲 ");
printf(" 2. 繼續(xù)當(dāng)前游戲\n\n");
printf("回復(fù)數(shù)字序號(hào)選擇一項(xiàng)吧:");
scanf_s("%d", &q);
if (q == 2)
comparation();
else
{
system("cls");
menu();
}
}
}
找最值游戲
void maxmin()
{
int i, j, n, p, q, max, min, maxx, minn;
int a[5];
srand(time(NULL));
system("color DF");
system("cls");
printf("\n\n\t* * * * * * * * * * * * * *\n"); //找最值游戲規(guī)則
printf("\t* 游 戲 規(guī) 則 *\n");
printf("\t* 開(kāi)始游戲后將會(huì)顯示隨機(jī)五個(gè)整數(shù), *\n");
printf("\t* 請(qǐng)分別找出五個(gè)整數(shù)的最大值和最小 *\n");
printf("\t* 值,若回答正確即可獲得 2 分獎(jiǎng)勵(lì)。 *\n");
printf("\t* 加油噢,你能行! *\n");
printf("\t* * * * * * * * * * * * * *\n");
printf("\t * * * \n");
printf("\t * * * \n");
printf("\t * * * * * \n");
printf("\t * * * \n");
printf("\t * \n");
printf("\t 輸入數(shù)字 0 即可開(kāi)始游戲:");
scanf_s("%d", &p);
if (p == 0)
{
for (i = 0; i < 5; i++)
a[i] = rand() % 10;
printf("\n\n\t* * * * * * * * * * * * * *\n");
printf("\t* *\n");
printf("\t* ");
for (i = 0; i < 5; i++)
printf(" %d ", a[i]);
printf(" *\n");
printf("\t* *\n");
printf("\t* * * * * * * * * * * * * *\n\n");
printf("接下來(lái),請(qǐng)找出最大值:");
scanf_s("%d", &maxx);
printf("\n然后請(qǐng)找出最小值:");
scanf_s("%d", &minn);
max = a[4];
min = a[1];
for (i = 0; i < 5; i++)
{
if (a[i] > max)
max = a[i];
if (a[i] < min)
min = a[i];
}
if (maxx == max && minn == min) //驗(yàn)證回答正確與否
{
system("color AF");
printf("\n哇你太棒啦!獲得獎(jiǎng)勵(lì) 2 分!\n\n");
score();
score();
system("pause");
system("color 0F");
printf("\n\n想挑戰(zhàn)別的游戲嗎?\n\n");
printf("1. 挑戰(zhàn)其它游戲 ");
printf(" 2. 繼續(xù)挑戰(zhàn)找最值游戲 ");
printf(" 3. 查看當(dāng)前得分\n\n");
printf("回復(fù)數(shù)字序號(hào)選擇一項(xiàng)吧:");
scanf_s("%d", &q);
if (q == 2)
{
system("cls");
maxmin();
}
else if (q == 3)
scorep();
else
{
system("cls");
menu();
}
}
else
{
system("color 4F");
printf("\n有點(diǎn)小可惜,再挑戰(zhàn)一次吧!\n\n");
system("pause");
maxmin();
}
}
else //退出找最值游戲?
{
system("color F0");
printf("\n\n想玩別的游戲嗎?\n\n");
printf("1. 挑戰(zhàn)其它游戲 ");
printf(" 2. 回到當(dāng)前游戲\n\n");
printf("回復(fù)數(shù)字序號(hào)選擇一項(xiàng)吧:");
scanf_s("%d", &q);
if (q == 2)
maxmin();
else
{
system("cls");
menu();
}
}
}
小結(jié)
這個(gè)數(shù)字益智游戲是我第一次編寫(xiě)如此規(guī)模的 C 語(yǔ)言程序,知識(shí)水平有限,也花了不少時(shí)間去編寫(xiě)這個(gè)程序,代碼可能有不盡完美的地方,也沒(méi)有盡可能地簡(jiǎn)化代碼。最后,非常歡迎各路大神給我提出一些建議,大家一起學(xué)習(xí),共同進(jìn)步,奧力給!
以上所述是小編給大家介紹的C語(yǔ)言編一個(gè)數(shù)字益智小游戲,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
如果你覺(jué)得本文對(duì)你有幫助,歡迎轉(zhuǎn)載,煩請(qǐng)注明出處,謝謝!
相關(guān)文章
基于errno返回值的對(duì)應(yīng)錯(cuò)誤碼的詳細(xì)介紹
本篇文章是對(duì)errno返回值的對(duì)應(yīng)錯(cuò)誤碼進(jìn)行了詳細(xì)的分析介紹,需要的朋友參考下2013-05-05
VisualStudio2022下配置 OpenMP多線程編程環(huán)境與運(yùn)行
本文主要介紹了VisualStudio2022下配置 OpenMP多線程編程環(huán)境與運(yùn)行,文中通過(guò)圖文介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2024-06-06
C++通過(guò)boost.date_time進(jìn)行時(shí)間運(yùn)算
這篇文章介紹了C++通過(guò)boost.date_time進(jìn)行時(shí)間運(yùn)算的方法,文中通過(guò)示例代碼介紹的非常詳細(xì)。對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2022-06-06
C++ boost 時(shí)間與日期處理詳細(xì)介紹
這篇文章主要介紹了C++ boost 時(shí)間與日期處理詳細(xì)介紹的相關(guān)資料,這里提供實(shí)例代碼,及實(shí)現(xiàn)效果,需要的朋友可以參考下2016-11-11
C++使用ZLIB庫(kù)實(shí)現(xiàn)目錄壓縮與解壓功能
在軟件開(kāi)發(fā)和數(shù)據(jù)處理中,對(duì)數(shù)據(jù)進(jìn)行高效的壓縮和解壓縮是一項(xiàng)重要的任務(wù),這不僅有助于減小數(shù)據(jù)在網(wǎng)絡(luò)傳輸和存儲(chǔ)中的占用空間,還能提高系統(tǒng)的性能和響應(yīng)速度,本文將介紹如何使用 zlib 庫(kù)進(jìn)行數(shù)據(jù)的壓縮和解壓縮,以及如何保存和讀取壓縮后的文件2025-02-02
C++ 中時(shí)間與時(shí)間戳的轉(zhuǎn)換實(shí)例詳解
這篇文章主要介紹了C++ 中時(shí)間與時(shí)間戳的轉(zhuǎn)換實(shí)例詳解的相關(guān)資料,需要的朋友可以參考下2017-06-06
C++11中bind綁定器和function函數(shù)對(duì)象介紹
這篇文章主要介紹了C++11中bind綁定器和function函數(shù)對(duì)象介紹,綁定器,函數(shù)對(duì)象和lambda表達(dá)式只能使用在一條語(yǔ)句中,更多相關(guān)內(nèi)容需要的小伙伴可以參考一下2022-07-07
C語(yǔ)言實(shí)現(xiàn)簡(jiǎn)單通訊錄管理系統(tǒng)
這篇文章主要為大家詳細(xì)介紹了C語(yǔ)言實(shí)現(xiàn)簡(jiǎn)單通訊錄管理系統(tǒng),文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2021-07-07

