前言
在乎也好,不在乎也罢,都不要欺骗自己,战胜情绪跟战胜敌人一样,首先你得承认它的存在——《死人经》
??
\;
??
\;
??
\;
控制台各种颜色
void set(int color) {
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), color);
}
void red() {
set(
FOREGROUND_INTENSITY | FOREGROUND_RED
);
}
void green() {
set(
FOREGROUND_INTENSITY | FOREGROUND_GREEN
);
}
void blue() {
set(
FOREGROUND_INTENSITY | FOREGROUND_BLUE
);
}
void yellow() {
set(
FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN
);
}
void cyan() {
set(
FOREGROUND_INTENSITY | FOREGROUND_GREEN | FOREGROUND_BLUE
);
}
void purple() {
set(
FOREGROUND_RED | FOREGROUND_BLUE
);
}
void pink() {
set(
FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_BLUE
);
}
void white() {
set(15);
}
void recovery() {
set(7);
}
获取文件夹路径
char g_filedir[256] = "unknown";
char g_filename[256] = "unknown";
void inidir() {
getcwd(g_filedir,sizeof(g_filedir));
}
新shell
就这样,,,如果是输入ipconfig的话不会打印信息到程序窗口,而是打开命令行窗口后又关掉
void calc(){
system("start calc");
}
void note(){
system("star notepad")
}
|