Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. how can I make password to my prog.

how can I make password to my prog.

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
7 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    suroor453
    wrote on last edited by
    #1

    hi all, I have done a small programe in c++. it is a "phonebook" the user can add,delete,find....contacts I need to make the user to enter a password before that.

    D R N 3 Replies Last reply
    0
    • S suroor453

      hi all, I have done a small programe in c++. it is a "phonebook" the user can add,delete,find....contacts I need to make the user to enter a password before that.

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      suroor_bio wrote: I need to make the user to enter a password before that. Ok, so what's your question? Is this a console or GUI application?


      "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

      S 1 Reply Last reply
      0
      • D David Crow

        suroor_bio wrote: I need to make the user to enter a password before that. Ok, so what's your question? Is this a console or GUI application?


        "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

        S Offline
        S Offline
        suroor453
        wrote on last edited by
        #3

        it is a console

        1 Reply Last reply
        0
        • S suroor453

          hi all, I have done a small programe in c++. it is a "phonebook" the user can add,delete,find....contacts I need to make the user to enter a password before that.

          R Offline
          R Offline
          Ritu Kwatra
          wrote on last edited by
          #4

          One way to do this is to do in the C style by using getch() function to enter the charater. getch() function do not display character on the screen. char passwd[15]; int i=-1; printf("Enter Password:"); do { passwd[++i] = getch(); } while(passwd[i] != 13); passwd[i] = '\0'; printf("\npassword is %s\n",passwd); 13 is the ascii code for the return key. Hope it will work :) Ritu Kwatra

          T 1 Reply Last reply
          0
          • R Ritu Kwatra

            One way to do this is to do in the C style by using getch() function to enter the charater. getch() function do not display character on the screen. char passwd[15]; int i=-1; printf("Enter Password:"); do { passwd[++i] = getch(); } while(passwd[i] != 13); passwd[i] = '\0'; printf("\npassword is %s\n",passwd); 13 is the ascii code for the return key. Hope it will work :) Ritu Kwatra

            T Offline
            T Offline
            ThatsAlok
            wrote on last edited by
            #5

            Ritu Kwatra wrote: 13 is the ascii code for the return key. Hope it will work WOW!, you back :)

            "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

            cheers, Alok Gupta

            1 Reply Last reply
            0
            • S suroor453

              hi all, I have done a small programe in c++. it is a "phonebook" the user can add,delete,find....contacts I need to make the user to enter a password before that.

              N Offline
              N Offline
              namaskaaram
              wrote on last edited by
              #6

              check out this cp link..... maybe u might find it useful..... http://www.codeproject.com/script/comments/forums.asp?forumid=1647&XtraIDs=1647&searchkw=rateep&sd=3%2F23%2F2005&ed=6%2F21%2F2005&select=1095306&df=100&mpp=50&fr=6602#xx1095306xx[^] cheerz..... "faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13

              S 1 Reply Last reply
              0
              • N namaskaaram

                check out this cp link..... maybe u might find it useful..... http://www.codeproject.com/script/comments/forums.asp?forumid=1647&XtraIDs=1647&searchkw=rateep&sd=3%2F23%2F2005&ed=6%2F21%2F2005&select=1095306&df=100&mpp=50&fr=6602#xx1095306xx[^] cheerz..... "faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13

                S Offline
                S Offline
                suroor453
                wrote on last edited by
                #7

                Thanks to All

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups