★ 글자색을 변경해 봅시다

#include <cstdio>
#include <windows.h>
void textcolor(int color_number)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), color_number);
}
int main()
{
int i;
for(i=1;i<=15;i++)
{
textcolor(i);
printf("안녕하세요\n");
}
return 0;
}'C언어로 게임만들기' 카테고리의 다른 글
| 8. C언어로 게임만들기 - time() 함수 (0) | 2020.03.29 |
|---|---|
| 7. C언어로 게임만들기 - rand()함수 (0) | 2020.03.28 |
| 5. C언어로 게임만들기 - gotoxy함수 - 달팽이 모양 출력하기 (0) | 2020.03.27 |
| 4. C언어로 게임만들기 - gotoxy함수 - 사각형출력하기 (0) | 2020.03.27 |
| 3. C언어로 게임만들기 - gotoxy함수 - 가로줄 출력하기 (0) | 2020.03.27 |

