ok... OP = what? and i realize that the answer is in the question
"Create a structure named Carpet that has two public data members: lengthInFeet and widthInFeet.
Write a main() function that instantiates a Carpet object and assigns values to its fileds.
Pass the object to a function named Area() that calculates the carpet area in square feet and displays the results.
Save the file as Carpet.cpp"
ok i under stand the creating of the two members L.I.F; and W.I.F;
i also understand the main () function but other then a little minor editing that is needed to some parts in my code here and there would my code be useable if i did some minor editing
No MSkillet, the task clearly said that the OP( as in, O.riginal P.oster) needs to use "struct with two public data members" and "function Area()" to solve the task. The output of your program would of course be the same, but it's NOT what the OP asked for.
If you don't know what that's supposed to mean, the tutorials bazzy linked to:
MSkillet, it's usually a good idea to actually read the OP before you answer it. Your program is simpler, but it's not at all what the OP was asking for.