From: Fozzy the Bear Newsgroups: comp.os.msdos.djgpp Subject: Simple password program Date: Tue, 30 Jun 1998 22:29:42 -0700 Organization: InterNex Information Services 1-800-595-3333 Lines: 35 Message-ID: <3599C945.3AC1F40B@geocities.com> NNTP-Posting-Host: sjas-30-0-18.sj.bigger.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hello I am new to C but have learned alot so far, I tried to make a simple password program, but it didn't turn out to be so simple. I can't get it to work. I get this error: password.c: In function `main': password.c:22: invalid lvalue in assignment please help me figure out what is wrong. ---------------------------start here------------------------------------ #include main() { char name[30],password[50]; /* enough ?? */ printf("login: "); scanf("%s",name); printf("password: "); scanf("%s",password); if(&name="fozzy") /* ,&password==bear */ { printf("Welcome %s\n"); } else { print("You Do Not Have authorisation To Use This Computer!"); print("This Attempt Will Be Logged When I Learn How"); } /* return 0; */ }