help with checking for upper & lower case & digit

what function can i use to check for uppercase lower case and digit in the
bool validate(char* vpassword) function


#include <cstdlib>
#include <iostream>
#include <iomanip> //to format output
#include <string>
#include <fstream>

using namespace std;
bool validate( char* );
int main(int argc, char *argv[])
{
int length =0;
char vpassword[20]; //need more than 6
//char i = 6;
bool valid; //define these inside validate: bool6, boollc, booluc, boold;

cout << "Enter your Employee password:";
cin >> vpassword;
bool validate();
/*now check if valid (which is a variable)
to see if it is tru or not. if true, print " password accepted"
if not, ask the user for another input. repeat max of 3 times
*/

system("pause");
return 0;
}

bool validate(char* vpassword)
{
int length =0;
bool bool6, boollc, booluc, boold;

for(int i=0; i<20; i++)
{
if (vpassword[i] != '\0')
{
length = length +1;
}
}

if (length <6)
{
bool6 = 1;
}

for(int i=0; i<20; i++)
{
//check if you have upper case
//if yes, then set booluc to 1 and break out of the loop
//if not, keep going
}
for(int i=0; i<20; i++)
{
//check if you have lower case
//if yes, then set boollc to 1 and break out of the loop
//if not, keep going
}
for(int i=0; i<20; i++)
{
//check if you have a digit
//if yes, then set boold to 1 and break out of the loop
//if not, keep going
}

if(boollc && booluc && boold && bool6)
{
return true;
}
else
{
return false;

system("PAUSE");
return EXIT_SUCCESS;
}
}
Topic archived. No new replies allowed.