Hello,

I am working on a program that requires a password. I am using:
Code:
#include<iostream.h>
#include<conio.h>
#include<fstream.h>
#include<ctype.h>
#include<stdio.h>
#include<string.h>

int main()

{
	int ch;
	char pword[BUFSIZ];
	int p=0;
	puts ("Enter Password: ");

	while ((ch = getch()) != EOF 
          && ch != '\n' 
          && ch != '\r' 
          && p < sizeof(pword) - 1)
	{
		if (isalnum(ch))
    {
		  putchar('*');
		  pword[p++] = ch;
    }
to have to user imput the password.

The problem is i cant verify the password, i have tried: if else, while, and switch case.

Can some one please tell me how to verify the password or if there is a better way to ask for imput.
Thanks,
-KJ Magic