|
-
Oct 7th, 2000, 01:14 PM
#1
Thread Starter
Addicted Member
I have a short question - what's the code to find the number of rows and columns in a text file? Say I have something like this:
2,7,3
4,5,2
I want to assign some variable with the number 3 and another with 2. If yer wondering why, I need this fer my tiling. :)
To understand recursion, one must first understand the concept of recursion.
-
Oct 8th, 2000, 09:52 AM
#2
Thread Starter
Addicted Member
just bringin this back up to the top cuz no one answered it yet!!!!! >:O
To understand recursion, one must first understand the concept of recursion.
-
Oct 9th, 2000, 11:04 AM
#3
Thread Starter
Addicted Member
Once again, I'm bringing my question back to the top, still waiting for an answer ;)
To understand recursion, one must first understand the concept of recursion.
-
Oct 9th, 2000, 06:51 PM
#4
Member
Short of opening it in Binary mode and parsing it, there's not really much of a way of doing that. If you need to know, you can store the width and height at the start of the file.
[code]
3,5
5,10, 4
20,40,23
45,11, 6
2,10, 4
9, 9, 9
[code
For example.
Of course, binary mode is better suited for a file like that, but ...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|