//cool text display thing
//delay format: 1*delay (seconds)
#include<bits/stdc++.h>
using namespace std;
void displaytext(string t,double delay,bool end){
int i=0;
while (t[i]!='\0'){
cout<<t[i];
usleep(1000000*delay);
i++;
}
if(end)cout<<endl;
}
int main(){
displaytext("hello world",0.1,true);
displaytext(to_string(69),0.05,false);
return 0;
}
C++ 文字显示
最新推荐文章于 2023-06-29 23:28:33 发布