I want as said in 'cout' to input 10 or more letters in this statement but when i try to run it when I enter more then 10 letters i get error that says:: Run-Time Check Failure #2 - Stack around the variable 's' was corrupted" so is there any way to solve this problem urgent please??
int main()
{
char s[10];
cout << "ENTER a few letters not crossing 10" << " ";
gets(s);
if(strlen(s) < 10)
{
cout << "It's OK...\n";
}
else if(strlen(s) >= 10)
{
cout << "This shit doesn't work";
}
system("pause");
return 0;
}