Username & Password - Problem

This is a discussion on Username & Password - Problem within the C Programming forums, part of the General Programming Boards category; Hey guys, well i am having a little trouble with a username and password login program i made because the ...

  1. #1
    Registered User Sedition X's Avatar
    Join Date
    Jan 2011
    Location
    Tasmania, Australia
    Posts
    17

    Username & Password - Problem

    Hey guys, well i am having a little trouble with a username and password login program i made because the help bit at the end does not work.

    Have a look:
    Code:
    #include<stdio.h>
    
    int main()
    {
          int user;
          int pass;
          int help;     
          
    printf("Enter Your Username: ");
    scanf("%d", &user);
    if(user == 000001)
    
    printf("Enter Your Password: ");
    scanf("%d", &pass);
    if(pass == 000001)
    
    printf("Login Successful!");
    printf("\n");
    
    printf("\n1.Help");
    printf("\n2.Exit");
    
    printf("\nCommand: ");
    scanf("%d", help);
    if(help == 1)
    printf("This is a programe made to test a username and password login interface.\n Made By Name");
    
    getch();
    getch();
    getch();
    }
    If you could help me i would really appreciate it

  2. #2
    Registered User
    Join Date
    Apr 2008
    Posts
    90
    this:
    Code:
    scanf("%d", help);
    should be this:
    Code:
    scanf("%d", &help);

  3. #3
    Registered User Sedition X's Avatar
    Join Date
    Jan 2011
    Location
    Tasmania, Australia
    Posts
    17
    Thanks for the help

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Read from file and match the password and username
    By plodos in forum C Programming
    Replies: 3
    Last Post: 01-05-2009, 12:10 PM
  2. problem: online on winxp and linux red hat
    By gemini_shooter in forum Linux Programming
    Replies: 5
    Last Post: 05-29-2005, 02:14 PM
  3. Problem reading from external file
    By djayz in forum C Programming
    Replies: 13
    Last Post: 03-24-2005, 12:15 PM
  4. username password
    By jamie85 in forum C Programming
    Replies: 14
    Last Post: 03-14-2004, 04:46 PM
  5. Check if input password is correct
    By kagemand in forum C++ Programming
    Replies: 2
    Last Post: 11-28-2001, 08:28 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21