I think he wants to output the result of that expression after simplifying it using symbolic calculus. That can't be done automatically in C++ (you can do it in Maple, Mathematica or Matlab). So what you have to do is: simplify it by hand, using v1, v2 and v3 as symbolic variables, and after that, susbtitute them by the numbers. ie:
(v1 * ((1-t)*(1-t)*(1-t))) + vc1 * (3 * ((1-t)*(1-t))) * t + vc2 * ( 3 * ((1-t) * (t*t)))+ (v2 * (t*t*t))
that is equal to:
(v1 * ((1-t)*(1-t)*(1-t))) + 3 * vc1 * t*(1-t)*(1-t) + 3 * vc2 * t * t * (1-t) + v2*t*t*t
so now, you do the "cout <<" thing but only with the v1, v2, vc1, vc2 variables and the rest of the expression you keep it as a string:
code:
cout << "Answer = " << v1 << " * (1 - t) * (1 - t) * (1 - t) + (" << 3 * vc1 << ") * t * (1 - t) * (1 - t) + (" << 3 * vc2 << ") * t *t * (1 - t) + (" << v2 << ") * t * t * t" << endl;
Note how i've used parenthesis in the expression around the calculated values of 3*vc2, etc... to make mathematically correct the expression in the case where vc2 is a negative number