Looping through lines of floats/int
Break some of the functionality into functions. For instance, notice that all line types except for 4 behave similarly. So how about you do:

bool isSimpleType(char c) {
    return (c &gt;= '0' &amp;&amp; c &lt;= '3') || (c == '5');
}


With this, you can now simplify your main loop:

for(int i = 1; std::getline(stream, line); ++i)
{
    if (line == "")
        continue;

    const char type = line.front();

    if (isSimpleType(type)) {
        std::cout &lt;&lt; "Line " &lt;&lt; i &lt;&lt; " type " &lt;&lt; type &lt;&lt; ": " &lt;&lt; line &lt;&lt; "\n";
    }
    else if (type == '4') {
        // Omitted to reduce clutter
    }
    else {
        std::cout &lt;&lt; "Line " &lt;&lt; i &lt;&lt; " No type" &lt;&lt; std::endl;
    }
}


Finally, let us proceed along similar lines to simplify the case of '4'. I'll let you take over from here, but read the inputs to a vector and pass that onto a function that is responsible for verifying if the line is OK and constructing a suitable object from the data then.

Also, instead of relying on "naked values", you could also consider using a class enum Type { ... } to define the different line types. I recommend you read more about enums for this.