欧美大屁股bbbbxxxx,狼人大香伊蕉国产www亚洲,男ji大巴进入女人的视频小说,男人把ji大巴放进女人免费视频,免费情侣作爱视频

歡迎來到入門教程網(wǎng)!

C語言

當(dāng)前位置:主頁 > 軟件編程 > C語言 >

C++實(shí)現(xiàn)類似延時(shí)停頓的打字效果

來源:本站原創(chuàng)|時(shí)間:2020-01-10|欄目:C語言|點(diǎn)擊: 次

能夠定位光標(biāo)位置,改變屏幕設(shè)置

#include <iostream>
#include <windows.h>
#include <conio.h>
#include <stdlib.h>      //system函數(shù)所需頭文件
#define stoptimelong 500  //Sleep函數(shù)以毫秒為單位,Sleep(500);表示停半秒
using namespace std;
 
//跳到屏幕指定坐標(biāo)
 
void gotoxy(int x,int y)
{  CONSOLE_SCREEN_BUFFER_INFO  csbiInfo;
  HANDLE  hConsoleOut;
  hConsoleOut = GetStdHandle(STD_OUTPUT_HANDLE);
  GetConsoleScreenBufferInfo(hConsoleOut,&csbiInfo);
  csbiInfo.dwCursorPosition.X = x;
  csbiInfo.dwCursorPosition.Y = y;
  SetConsoleCursorPosition(hConsoleOut,csbiInfo.dwCursorPosition);
}
 
int main(void)
{  int x=14, y=5;
  gotoxy(x, y);
  printf("你好!");
  Sleep(stoptimelong);
  system("color 10");   //調(diào)用控制臺(tái)顏色管理命令,可以改變屏幕和字體的顏色
  printf("歡");
  Sleep(stoptimelong);
  printf("迎");
  Sleep(stoptimelong);
  printf("來");
  Sleep(stoptimelong);
  printf("到");
  system("color 19");
  Sleep(stoptimelong);
  printf("計(jì)");
  Sleep(stoptimelong);
  printf("算");
  Sleep(stoptimelong);
  printf("機(jī)");
  system("color 37");
  Sleep(stoptimelong);
  printf("冒");
  Sleep(stoptimelong);
  printf("險(xiǎn)");
  system("color 46");
  Sleep(stoptimelong);
  printf("世");
  Sleep(stoptimelong);
  printf("界");
  Sleep(stoptimelong);
  printf("!");
  Sleep(stoptimelong);
  cout<<endl;
  getch();
  return 0;
}

演示圖片

以上所述就是本文的全部?jī)?nèi)容了,希望能夠?qū)Υ蠹覍W(xué)習(xí)C++有所幫助。

上一篇:C++中十種內(nèi)部排序算法的比較分析

欄    目:C語言

下一篇:ubuntu 下編譯C++代碼出現(xiàn)的問題解決

本文標(biāo)題:C++實(shí)現(xiàn)類似延時(shí)停頓的打字效果

本文地址:http://mengdiqiu.com.cn/a1/Cyuyan/3114.html

網(wǎng)頁制作CMS教程網(wǎng)絡(luò)編程軟件編程腳本語言數(shù)據(jù)庫(kù)服務(wù)器

如果侵犯了您的權(quán)利,請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)進(jìn)行處理、任何非本站因素導(dǎo)致的法律后果,本站均不負(fù)任何責(zé)任。

聯(lián)系QQ:835971066 | 郵箱:835971066#qq.com(#換成@)

Copyright © 2002-2020 腳本教程網(wǎng) 版權(quán)所有