I have problem in counting the number of letters in the strings entered by the user. CAn anyone suggest something in the following codes?
#include <iostream>
using namespace std;
int main()
{
char* str;
cout<<"enter the string to count the number of letters in it.";
cin>>str;
cout<<str.length;
return 0;
}