filecomplete/main.cpp

35 lines
685 B
C++
Raw Normal View History

#include "filecomplete.h"
#include <iostream>
#include <string>
#include <thread>
static int cnt = 5;
// 测试光标位置
void delay_auto_show()
{
while (--cnt) {
std::this_thread::sleep_for(std::chrono::seconds(10));
std::cout << "IMCOMMING..............." << std::endl;
}
}
int main(int argc, char** argv)
{
std::cout << "PreContent1 " << std::endl;
std::cout << "PreContent2 " << std::endl;
fc_append('|');
std::thread t(delay_auto_show);
while (1) {
char* content = fc_readline();
if (content) {
fc_free(content);
std::cout << "" << std::endl;
}
}
t.join();
return 0;
}