Quote Originally Posted by bekim View Post
i did some modifications :
#include <iostream>
using namespace std;
int main ()
{
int numDoubles = 0;
char text[30];

cout<<"Enter sentence: ";
cin.getline(text,30);


for (int i = 0; i<(text[30]); i++)
if (isalpha(text[i]) == isalpha(text[i+1]))
numDoubles++;
cout << "There is "<< numDoubles << " character double.";
cin.get();cin.get();
return 0;
}



but it still dont work the output is always 0
Now you're just guessing. Instead of writing nonsense, you should correct the mistake I pointed out. I showed you the correct spelling. I don't know how much simpler to make it.