注意我是初学者。睡眠(4000)显示。每1000(C++)
我想要做的是显示一个“。”定时器每1000秒钟。我想要“。”在cout后面显示。
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
char uname;
char pword;
cout << "Initializing EKG";
Sleep(4000);
/* while/for Sleep(1000) cout << "."
while Sleep(1000*2) cout << "."
*/
//Something along those lines I am trying to achieve.
//Can't I use a ++ or something similar to increase the . to .. to ... to ....?
return 0;
}
有时我想知道人们是否在撰写问题时看预览。 – rightfold 2014-10-27 22:38:55
'睡眠'以毫秒为单位,而不是几秒,它的价值。 – 2014-10-27 22:55:46
哪个平台和操作系统?你可能想要一个单独的线程执行一个打印'。'的函数。每一秒。这将允许您的程序打印'。'同时执行其他操作。 – 2014-10-27 22:57:08