Small Basic - 用户名和密码文本文件。 [英] Small Basic - Username and Password text file.
问题描述
大家好
我希望看看是否有人有关于如何解决以下问题的程序或想法(特别是在Small Basic中),这是相当受欢迎的用C ++和Python编写的程序
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
user1,password1
user1,password1
user2,password2
user2,password2
user3,password3
user3,password3
我已经尝试了一段时间并且从文本文件中读取取得了一些成功,但我现在正在努力
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
推荐答案
不知道这是一个家庭作业,也不知道你的老师(如果有的话)对你的问题的看法,但是b
也许你试着把你的文本文件(每行一行)读成一个二维数组(你的分隔符是一个"。"(点)),比如
users [x] =" 1 = userX; 2 = passwordX;"。$
然后你可以比较你的2元素每个用户[x]子阵列的输入数组。如果它适合你的话。
注意:case(in)明智
希望这是肝脏到目前为止。
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.
这篇关于Small Basic - 用户名和密码文本文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!