Code:
#pragma once
#include <iostream>
using namespace std;
int main()
{
int num,cout=0;
cout <<"Enter the number:"; //here is the error
cin>>num;
bool done=true;
while(done)
{
if (num>=10)
{
num=num/10;
cout++;
}
else
{
cout++;
done=false;
}
}
printf ("%d",cout); // its working fine
system("pause");
return 0;
}
as much as cout i m using errors are increasing.
Error 1 error C2297: '<<' : illegal, right operand has type 'const char [18]'
Warning 2 warning C4552: '<<' : operator has no effect; expected operator with side-effect

