This is the problem below.
I am getting an infinite loop instead of int type of data in the do-while loop
#include <iostream>
#include <typeinfo>
int main()
{
int in; // variable in;
do //loop for check if variable get valid data
{
std::cout << "enter : ";
std::cin >> in;
if (typeid(in) == typeid(int()))
break;
else
std::cout << "invalid input !! " << std::endl;
} while (true);
}