username & pin

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kenneth6
    New Member
    • Mar 2007
    • 79

    username & pin

    i am writing something about username and pin.

    how can i filter the username contains only "a-z", "0-9", "." ONLY?
    how can i filter the pin contains only "a-z", "A-Z", "0-9"? and what other symbols should be included?

    how to ensure no space?
  • Laharl
    Recognized Expert Contributor
    • Sep 2007
    • 849

    #2
    Look up the functions in <ctype.h> or <cctype>, in particular isalpha() and isdigit(). To check for lowercase, you can check if it's between 'a' and 'z'.

    Comment

    • whodgson
      Contributor
      • Jan 2007
      • 542

      #3
      How do you look up what functions are in a header?

      Comment

      • Laharl
        Recognized Expert Contributor
        • Sep 2007
        • 849

        #4
        Google or similar? Also, these are fairly self explanatory, I think.

        Comment

        • weaknessforcats
          Recognized Expert Expert
          • Mar 2007
          • 9214

          #5
          Originally posted by whodgson
          How do you look up what functions are in a header?
          Visual Studio? Press F1.

          Comment

          Working...