我想让一些文字一个一个输出,请帮忙解答,谢谢
最好可以简单一点,c++新手
2条回答 默认 最新
threenewbee 2019-06-10 21:23关注// Q765326.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <string.h> #include <windows.h> #include <conio.h> using namespace std; int main() { char str[] = "好好学习天天向上,提高警惕保卫祖国!"; for (int i = 0; i < strlen(str); i++) { HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE); COORD pos = { 0, 0 }; SetConsoleCursorPosition(h, pos); cout << str[i]; Sleep(300); } }本回答被题主选为最佳回答 , 对您是否有帮助呢?评论 打赏 举报解决 1无用 3
