what should i do ...

this is what i have
if i change ch into string give me error that i can't change int to string
if i change ch into char i get error on pw.....
in main i have pw ass string...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
int validate(string pw)
{	
	int number;
	string ch;

	ch = pw.substr(0);
	if (isalpha(ch))
		number = 1;
	if (isdigit(ch))
		number = 2;
	if (ch == tolower(ch))
		number = 3;
	if (ch == tolower(ch))
		number = 4;
	return number;
}
Last edited on
char ch = pw[0]; //provided that `pw' is not empty
so do i get the first letter of the string if I set up like this ?
Topic archived. No new replies allowed.