[HELP] read txt file + resources

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
phillipm
Posts: 4
Joined: Wed Mar 15, 2006 3:08 pm

[HELP] read txt file + resources

Post by phillipm »

So I have started programming, and it has been going well.

I am currently working on a Sudoku game, which will include multiple levels, music, timer, and other fun stuff.

I want to be able store and read my puzzles in txt files, and then retreived them into a 2d array. can someone post a script that can do this. thanks.

Also, I can't seem to find source code that I can look at and build off of. I know it is out there. I was wondering if anyone knew of anywhere. it would be awsome to find something like the python cookbook(http://aspn.activestate.com/ASPN/Python/Cookbook/) for the psp homebrew scene.

thanks
phillip
danzel
Posts: 182
Joined: Fri Nov 04, 2005 11:03 pm

Post by danzel »

Are you coding this in python?
If so then standard python file input/output should work (I haven't tryed it myself, but thats the general gist I've got)
phillipm
Posts: 4
Joined: Wed Mar 15, 2006 3:08 pm

nope

Post by phillipm »

Nope, I am not doing this in python, (although python does rock).
I am doing this in c++ with the pspsdk.
phillipm
Posts: 4
Joined: Wed Mar 15, 2006 3:08 pm

?

Post by phillipm »

does anybody have a simple read from txt file function?
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

I would recommend The C Programming Language
Shoot Pixels Not People!
Makeshift Development
phillipm
Posts: 4
Joined: Wed Mar 15, 2006 3:08 pm

uh

Post by phillipm »

uh, that is a kinda old book.
I just need an example of a function someone has used to read a file.
please
User avatar
dsn
Posts: 47
Joined: Wed Nov 09, 2005 11:48 am
Location: Indianapolis, Indiana, USA

Post by dsn »

I think Drakonite is trying to say that this is pretty basic stuff... but you might try taking a look at this: http://www.mrx.net/c/index.html

This book is worth reading too: http://www.oreilly.com/catalog/pcp3/
Post Reply