Welcome to Dream.In.Code
Become a C++ Expert!

Join 149,551 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,585 people online right now. Registration is fast and FREE... Join Now!




Searching in a text file

 
Reply to this topicStart new topic

Searching in a text file, Certain values

The Midnighter
26 Nov, 2007 - 06:04 AM
Post #1

New D.I.C Head
*

Joined: 13 Oct, 2007
Posts: 5


My Contributions
Alright, so I'm making my own little DND game, it's going very well so far and I've decided to create some sort of character saving feature, I figure I'll just do this in a simple text file for now. So, here's what I'm thinking, a while back I made some AI in Perl that wrote to a db file, but the syntax is so different between the two languages that I can't figure out what I'm trying to do anymore, ahha.

The char.txt is going to look like this:
charName, charLevel, str, dex, etc...

I need to find out how to find each of these values, I was originally thinking I could use a size_t and do a .find for each comma, separate values... Would this work?
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 1/7/09 09:47PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month