I am trying to complete a C++ assignment for one of my classes and have become confused due to my inability to get it to compile. Everything seems to be in order, but no joy so far. Below I have posted my code along with the output of the compiler errors. Any assistance will be greatly appreciated.
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
using std::ios;
#include <iomanip>
using std::setiosflags;
using std::setprecision;
using std::setw;
cout << "Enter the <strong class="highlight">sales</strong> person <strong class="highlight"><vb_highlight>(1</strong></vb_highlight> - <strong class="highlight">4)</strong>, "
<< "product number <strong class="highlight"><vb_highlight>(1</strong></vb_highlight> - 5)\nand total <strong class="highlight">sales</strong>."
<< "Enter -1 for the <strong class="highlight">sales</strong> person <strong class="highlight"><vb_highlight>to</strong></vb_highlight> end input.\n";
cin >> salesPerson;
Compiler Errors:
================
Compiler: Default compiler
Executing g++.exe...
Line Error
In function `int main()':
16: error: expected primary-expression before "const"
16: error: expected `;' before "const"
17: error: `double' is not a template
17: error: `strong' undeclared (first use this function)
17: error: (Each undeclared identifier is reported only once for each function it appears in.)
17: error: missing `>' to terminate the template argument list
17: error: expected primary-expression before "double"
17: error: expected `;' before "double"
17: error: expected primary-expression before ',' token
17: error: `value' undeclared (first use this function)
18: error: `totalSales' undeclared (first use this function)
18: error: `productSales' undeclared (first use this function)
18: error: expected primary-expression before '<' token
18: error: expected `]' before "class"
18: error: expected `;' before "class"
21: error: expected `;' before "highlight"
28: error: expected primary-expression before '<' token
28: error: expected `;' before "class"
32: error: expected `;' before "highlight"
41: error: expected primary-expression before '<' token
41: error: expected `;' before "class"
41: error: expected primary-expression before "class"
41: error: expected `)' before "class"
41: error: expected primary-expression before "class"
41: error: expected `;' before "class"
41: error: name lookup of `i' changed for new ISO `for' scoping
41: error: using obsolete binding at `i'
41: error: expected `;' before ')' token
59: error: expected primary-expression before '<' token
59: error: expected `;' before "class"
59: error: expected primary-expression before "class"
59: error: expected `)' before "class"
59: error: expected primary-expression before "class"
59: error: expected `;' before "class"
59: error: name lookup of `j' changed for new ISO `for' scoping
59: error: using obsolete binding at `j'
59: error: expected `;' before ')' token
I was just pointing out the hilariousness of said compilation error. I think we could all agree that the errors in this piece of code were obvious. The code must've been directly copied and pasted from a website. If so, this gives a whole new meaning to the term "copy and paste error".