在编辑股票时需要帮助代码 [英] need help with codes on edit stock

查看:56
本文介绍了在编辑股票时需要帮助代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么能从database.txt编码呢

•读取文件。

•提取相关数据(即解析其内容)。

•修改数据。

•将修改后的数据写回文件。



需要帮助

how can i code this from database.txt
•read the file.
•extract the relevant data (that is parse its content).
•modify the data.
•write back the modified data to the file.

need help

推荐答案

  • 读取文件。
  • 提取相关数据(即解析其内容)。
  • 修改数据。
  • 将修改后的数据写回文件。


ReadFile [ ^ ]。至于其余部分,你真的必须尝试考虑你正在阅读的记录的内容,以及如何更新它们,没有人可以为你编写代码。
Start with ReadFile[^]. As to the rest you will really have to try think about the content of the records you are reading, and how they can be updated, no one can write the code for you.


首先,你不能指望别人为你编码。你应该尽量做你想做的事,如果你有任何具体的技术问题,请在这里发布。



你需要学习以下内容:



首先要了解如何使用C ++处理文件I / O: http://www.cplusplus.com/doc/tutorial/files/ [ ^ ]



您的 database.txt 文件可能有一个方案像XML或JSON。要解析JSON或XML,他们有很多开源C ++库(要找到它们谷歌会帮助你)。
First, you cannot expect others to code for you. You should try to do what you want yourself, and if you have any specific technical problem, please post them here.

You'll need to learn the following things:

First learn about handling file I/O in C++ : http://www.cplusplus.com/doc/tutorial/files/[^]

Your database.txt file may probably have a scheme like XML or JSON. To parse JSON or XML they are plenty of open source C++ libraries (To find them google will help you).


这篇关于在编辑股票时需要帮助代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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