strange compiler error

cout << "The surface area of the prism is" << (2*l*w + 2(l+w)*h) << new;
Error:
393 H:\System\Apps\99C9C363-29BD-4D65-A572-7BD4152CA87A\Data\sat. sep,26 09\D calculator.cpp `2' cannot be used as a function
what am i doing wrong... i used this same type of line for 30 diff lines but this is the first error i got.

BTW is (2*l*w + 2(l+w)*h) the right formula for surface area of a rectangular prism because every where i go its different
The compilier thinks you are trying call to a function called '2'. Use (l+w)*2 instead of 2(l+w).
And after what people told you in your other thread, why are you still overriding new by defining it as a new line character?
Topic archived. No new replies allowed.