the reason that i didnt initialize ps and usr, is b/c the program makes it so that the user inputs the password. i made this program just to see if i could..anways, thx everyone for the help. the program works now, and the final source is this:
//store/check password
#include <iostream>
#include <cstdlib>
using namespace std;
class pswrd {
public:
char ps[80], usr[80];
int len;
void set_ps (char *p) {strcpy(ps, p);}
void check_ps () {
printf("\nPassword: ");
cin>>usr;
if(strcmp(usr,ps)) cout<<endl<<"Access Denied";
else if cout<<endl<<"Access Granted";
}
};
int main ()
{
pswrd ob1;
char p[80];
printf("Set Password: ");
cin>>p;
ob1.set_ps(p);
ob1.check_ps();
system("PAUSE");
}