Small Basic - Username and Password text file. RRS feed

  • Question

  • Hi All

    I am looking to see if anyone has a program or ideas on how to solve the question below (Specifically in Small Basic), This is quite a popular program in C++ and Python

    Login Program checking the persons username and password against a text based file

    I would like to have a text file containing several user names and password




    I have been experimenting for a while and have had some success with reading from the textfile but am now struggling

    has anyone got and tips or advice

    Friday, May 31, 2019 3:17 PM


  • Not knowing if this a homework or what your teacher (if one) thinks about your question, but

    perhaps you try to read your textfile (line per line) into a 2D array (your separator is a "." (point)) , like

    users[x] = "1=userX;2=passwordX;".

    Then you can compare your 2-element input array with each one of the users[x] subarrays. If it fits you're in.

    note: case(in)sensible

    Hope thats hepls so far.
    Friday, May 31, 2019 7:11 PM