int test, flag = 0;
cin >> test;
while (test--)
{
if (flag == 0)
cin.ignore(256, '\n'); // using because of whitespace reading due to cin
string check;
getline(cin, check);
checkPangram(check, check.size());
flag++;
}
If i remove line 4 then this program does't read few test cases string, so i used flag value to execute line 4 only once in starting. if you can help me find for any general method, to read string(with spaces) so that i can read even after cin or getline without any loss of input