hi every 1 i am new and Ihope that you would help me I have to write a program that will allow you to enter if you enter the password without using strcmp function and here is my try
#include <iostream>
#include <cstdio>
using namespace std;
bool password();
int main()
{
if( password())
cout<< "logged on"<<"\n";
else
cout<< "access deniled"<<"\n";
return 0;
}
bool password()
{
char s[80]={"pass"};
cout<< "enter password"<<"\n";
gets(s);
if( s=="pass")
{
cout<<"invalid password"<<"\n";
return false;
}
return true;
}
Code tags added. -Narue
plz answer me as herry as u can
thanx