How to not allow the user to type something on console

I know it is pretty noob question but i was not able to find any information on internet. I'm working on a fake loader.how can i not allow the user to type something on console? Thanks.

1
2
cout << Color(4,"Press enter to continue..") << endl;
	cin.get();

#include <iostream>
#include <Windows.h>
#include <string>
#include <fstream>
#include <tlhelp32.h>


using namespace std;


char* Color(int color = 7, char* Message = "") {
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), color);
return Message;
}

int main()
{
cout << Color(4,"Press enter to continue..") << endl;
cin.get();

if (GetAsyncKeyState(0x0D)) {
for (int a = 1; a < 101; a++)
{
Sleep(100);
system("CLS");
cout << Color(14, "Preparing the client... ") << a << "%"
;

if (a > 50) {
for (a = 48; a < 100; a++) {


Sleep(100);
system("CLS");
cout << Color(11, "Loading objects... ") << a << "%";


}






}







}
system("CLS");
cout << Color(2, "Program is working fine..") << "!";
cin.ignore();

}


}

Last edited on
Topic archived. No new replies allowed.