Hey,
I'm writing a function to read a set of strings and doubles from an input file, and I now want to send them back to the main program. The function returns each value from the input file at a time, but I cant see how I can deal with returning two different types of data from one function.
I've got two ideas as to how I could do this, but no clue on how to implement them:
1) Convert all of the values (strings and numeric values) to doubles, return them to main and then convert the strings stored as a double back to a string type.
2) Return all of the values as their respective data type. Can a single function be used to more than one data type?
Unfortunately I am not sure how to do either of these, does anyone have any ideas?
Thanks alot,
Kieran