I'm trying to create a program where I can print output to my console application and entering test without being override. Is there anyway to accomplish this? Here is my simple code showing my issue:
`
#include <iostream>
#include <thread>
#include <Windows.h>
void myThread()
{
while (1)
{
std::cout << "hello world" << std::endl;
Sleep(1000);
}
}
int main()
{
std::thread t1(myThread);
while (1)
{
std::cin.get();
}
return 0;
}
`