Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Reading in Files

$
0
0
I need to read in a .dat file and manipulate the words and letters in the file to a different format.
I am aware on how to read in a file however each item in the .dat file is on its own line like so:

run
jump
skip
365
fast-pace

I need to read in the items that are numbers as an long float etc.. and the words can be strings but I then need to re-organize them. Do I read them in, make them variables, and produce them in a new string or is there another way to go about doing this?
I specifically do not know how to make "run" or "365" into a variable from the file.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>