一:前言
先附上原文链接函数1.2
二:void color(int c);
这个函数是用来改变颜色的,改变的是输出字体的颜色,以下是我整理的几种颜色
数字c 颜色
7 灰白色(系统常用色)
8 灰色
9 深蓝
10 绿色
11 浅蓝
12 红色
13 紫色
14 黄色
15 白色
引用代码:
color(12);
cout<<"Let's add oil together!";
color(15);
效果:
三:void colorout(string s,int c);
这个函数是让我们用颜色c 来输出s,在改变成颜色15(可以设置)
引用代码:
color(15);
colorout("Let's add oil together!",12);
cout<<"\nLet's add oil together!";
效果: