Right triangle side length calculation
Holy comments Batman!

You have too many useless comments which makes your code harder to follow. 


  Comments should explain why something is done, not what is done.


Good code makes it obvious what is done, if you feel that you need to comment what is being done then your code can be improved instead. 

I'm going to link an answer to another question that explains commenting in a very good way (IMHO).

Prefer &amp;&amp; to and

This code if(sidea == 0 and sideb == 0 and sidec == 0) had me do a double take, the and totally threw me off as I'm very used to see &amp;&amp; used instead.

Keep it simple

One simplification you can make is to change bool error_check() into float read_real(). You should also extract your exit critera into a function and use it as a loop condition instead of breaking out of an infinite loop. This makes it much more clearer and removes the need for the comment. You can also extract computations from the conditional block when calculating the unknown side.

Like this:

float read_real(){
    float ans;
    std::cin &gt;&gt; ans;
    if(!std::cin){
        std::cin.clear();
        std::cin.ignore(256,'\n');
        throw std::invalid_argument("Please enter a real number");
    }
    return ans;
};

bool should_exit(float a, float b, float c){
    return a == 0 &amp;&amp; b == 0 &amp;&amp; c == 0;
}

...

float sidea = 1.0f;
float sideb = 1.0f;
float sidec = 1.0f;
while(!should_exit(sidea, sideb, sidec)){
    try{
        std::cout &lt;&lt; "side a: "; 
        sidea = read_real();

        std::cout &lt;&lt; "side b: ";
        sideb = read_real();

        std::cout &lt;&lt; "side c: ";
        sidec = read_real();

        // The unknown side must be 0, so this will work for all cases.
        float unknown = sqrt(abs(sidea*sidea + sideb*sideb - sidec*sidec));
        if(sidea == 0){
            std::cout &lt;&lt; "side a= " &lt;&lt; unknown &lt;&lt; "\n" &lt;&lt; std::endl;
        }
        else if(sideb == 0){
            std::cout &lt;&lt; "side b= " &lt;&lt; unknown &lt;&lt; "\n" &lt;&lt; std::endl;
        }
        else if(sidec == 0){
            std::cout &lt;&lt; "side c= " &lt;&lt; unknown &lt;&lt; "\n" &lt;&lt; std::endl;
        }
        else{
            throw std::invalid_argument("You must enter zero for an unknown side length.");
        }
    } catch (std::invalid_argument e){
        std::cout&lt;&lt;"\n Error: "&lt;&lt;e.what()&lt;&lt;std::endl;
    }
}