I have a text file that I need to read.
The text file looks like this:
redcars.dat type_1.2-1 speed acceleration inertia
blackcars.txt type3.4.44-112 weight length wheelbase engine inertia speed
good fair poor
0 25000.0 79000 125000.0 350000
My questions are:
1. How do I find a string within a string and store it ( in other words I don't want to store speed twice)?
2. The lines of text can be variable length so how can I process each line by reading it and finding the text I need? (ex: find the catagory CARDATA and ignore it, but I need redcars.dat and acceleration).
Thanks for your help!