checking a member of struct to be only alphabetic
<p>I tried to use, </p>

<pre><code>if(isalpha(card[i].name))
...
</code></pre>

<p>but it says that i can't use it with char type here is my code:
This is the struct:</p>

<pre><code>struct firm {
unsigned egn;
char name[80];
char lastname[80];
char department[80];
unsigned salary;
}card[100];
</code></pre>

<p>This is the function where i want to make the check if only letters then to continue:</p>

<pre><code>void enter()
{
int i, n;
char temp[80];
do{
    cout&lt;&lt;"Enter how many workers you want to add: ";cin&gt;&gt;n;
}while(!(n&gt;0 &amp;&amp; n&lt;101));
for(i=top;i&lt;n;i++)
{/*ЕГН + проверка*/
    cout&lt;&lt;"Enter EGN: ";do{
    cin&gt;&gt;temp;
if((strlen(temp)!=10))
    cout&lt;&lt;"Enter EGN: ";
}while(strlen(temp)!=10);
card[i].egn = (unsigned) atoi (temp);
/*Име Фамилия*/
cout&lt;&lt;"Enter name(only letters): ";cin&gt;&gt;card[i].name;
cout&lt;&lt;"Enter lastname(only letters): ";cin&gt;&gt;card[i].lastname;
cout&lt;&lt;"Enter department: ";cin&gt;&gt;card[i].department;
cout&lt;&lt;"Enter salary: ";cin&gt;&gt;temp;
card[i].salary = (unsigned) atoi (temp);
}
}
</code></pre>

<p>When i try to use this kind of code:</p>

<pre><code>cout&lt;&lt;"Enter name(only letters): ";do{
cin&gt;&gt;card[i].name;
if(isalpha(card[i].name))
.....;
</code></pre>

<p>and it says that i can't use char in int (isalpha uses int? )</p>
