try this it works
[CODE]#include

include
include

class string
{
char *str;
public:
void input()
{
cout<<"\nenter the string"<<endl;
cin>>str;
}
void display()
{
cout<<"\n"<<str;
}
int friend upper(string);
};
int upper(string a)
{
int j=0;

while((a.str)!='\0')
{
if((
a.str)>=65&&(*a.str)<91)
{
j++;
(a.str)++;
}
else
(a.str)++;
}
return(j);
}

int main()
{
clrscr();
int n;
string b;
b.input();
b.display();
n=upper(b);
cout<<"no of upper case letters are::"<<n;
getch();
return(0);
}[/CODE]
:)

WaltP commented: I hope he passes the class on your work. Maybe you can do his next assignment too... -4