Reading File as Input

Is there any way to have a text file be read by a class and have each line be an input in multiple classes?
Such as having a file list circle radii, followed by square perimeters or something:
2.5 (radius)
2.8 (radius)
6.0 (perimeter)
9.1 (perimeter)

and then this needs to be read in into a circle class as well as a square class.

Would a pointer in the readLine() function keep its place when switching through classes?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories