IN c++

What would be the code if i want to read a line from a file and this line contains numbers of different data types.I want to be able to save each number in a variabe of the same data type.

Example:

1.24 345 3442