How to collect doubles from user input and print them using a “pointer” to a “vector”?
It is a code that gets some double
s from the user input, and then prints them.
Input looks like this 1 2 3 4.5 x
, where x
is an arbitrary non-double
to break the first for
loop.
How to collect doubles from user input and print them using a “pointer” to a “vector”?
It is a code that gets some double
s from the user input, and then prints them.
Input looks like this 1 2 3 4.5 x
, where x
is an arbitrary non-double
to break the first for
loop.