关于文件的QT问题 [英] a QT problem about file

查看:71
本文介绍了关于文件的QT问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我正在qt创建者中编写程序,并且在程序运行时,我应该输入用户名和密码,并检查文件中是否存在用户名或密码。但我不知道怎么做以及如何检查文件行。你能告诉我吗?

Hi !
I am writing a program in qt creator and at first when the program is runing I should enter username and password and it should check if the username or password exist in the file . but i dont know how to do it and how to check a file lines .could you tell me ?

推荐答案

首先尝试使用Google。例如,用户名密码输入:



http://www.nkonecny.com/blog/2011/09/30/creating-a-user-login/ [ ^ ]





基本文件I / O在这里解释



http://www.learncpp.com/cpp-tutorial/136-basic-file-io/ [ ^ ]



您可以从示例开始并根据需要进行修改。如果这引起了进一步的问题,请回到这里。
Always try Google first. For example for username password entry:

http://www.nkonecny.com/blog/2011/09/30/creating-a-user-login/[^]


Basic file I/o is explained here

http://www.learncpp.com/cpp-tutorial/136-basic-file-io/[^]

You can start with the example and modify it to your needs. If that raises further questions come back here.


这篇关于关于文件的QT问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆