|
-
Sep 8th, 2000, 07:16 PM
#1
Thread Starter
New Member
I have a file of the following type:
text1.txt
1
text2.txt
20
how do I make it such that it will read the 'text.txt' as 'text' and the numbers as integers.
andrew
-
Sep 9th, 2000, 11:19 AM
#2
Monday Morning Lunatic
You have to read each line as a string. However, once you've loaded it, then you can use functions like atoi to convert them to an integer.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
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
|