How to make this program? (advanced txt reading)

Hello :)

I want to make this program for quite a while now, It's pretty much my main goal in learning C++ so far.
Been trying all kinds of stuff for months now, but keep failing to produce it.
So as a last resort I hope someone can point me in the right direction on this :)

The program:
It reads a txt file with info's in it ; lists the names alphabeticly ; When name is clicked(new window opens) and personal information is editable (+saves in the same txt file)

 ;Part of list (It's from a old MMORPG game, which many use as a private test server)


 ;Weapon Merchant, Goo-Deuk
(gennpc (index 1) (country 2) (kind 0) (shape 3) (html 1) (map 0) (xy 257491 258584 16120) (dir 254491 257584))

; Knight's Armor Merchant, Pa-Deukchun
(gennpc (index 2) (country 2) (kind 0) (shape 3) (html 3) (map 0) (xy 257016 258556 16140) (dir 260016 250556))

; Merchant, Gae-Yoo
(gennpc (index 3) (country 2) (kind 0) (shape 3) (html 7) (map 0) (xy 257556 258207 16140) (dir 256556 258207))


I was thinking of making it work like this :
-search all lines which start with "(gennpc"
-Look at the line above if it starts with a ";", if so print what's behind the ";" in a listbox. Else display index+number
-If the name in the listbox is clicked, it opens a new window and displays the following labels with textboxes behind them
Something like this:
*"Name" textBox1
*"Index" textBox2
*"Country" textBox3
*"kind" textBox4
*"shape" textBox5
*"html" textBox6
*"map" textBox7
*"location(xyz)" textBox8 textBox9 textBox10
*"facing towards(xy)" textBox11 textBox12

-Save it so that the engine understands it.


That's it , I hope you can show me where I can find the right tutorials to create this, or tell me how to make it :)
Prefere in Visual C++ and free if possable ^^

(Read "Herbert Schildt" its beginner guide, came into contact with: VC++ forms, VB forms, Win API, and some others)

If I forgot to explain something which might be neccesary to create this, please ask :)

Thanks on advance


And what is the code You already got?
Let's assume I can only read the full textfile and paste it in a textbox, don't know how to make VC++ read the text char by char, so can't split it up in the parts that are useable for me.

Hope this answers your question :)
Topic archived. No new replies allowed.