Thread: Some Help!
View Single Post
 
Reply
Posted 2002-04-09, 08:13 AM in reply to spa's post "Some Help!"
Code:
#include <stdio.h>
#include <string.h>
#include <conio.h>

const char sPwdCorrect[]="shokka";

int main(){
  char sPwdEntered[1024];
  printf("Enter Password:");
  gets(sPwdEntered);
  if(strcmp(sPwdEntered,sPwdCorrect)!=0){
    printf("Password Incorrect\n");
    return 1;
  }//endif(strcmp(sPwdEntered,sPwdCorrect)!=0)
  printf("Password Correct\n");
  //continue program here
  return 0;
}
Study it and learn. If you're a beginning programmer, I would suggest starting with BASIC instead of C
--WetWired
Old
Profile PM WWW Search
WetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusion
 
 
WetWired