Find the Errors
Each of the following declarations, programs, and program segments has errors. Locate as many as you can.
A) struct Names
{ string first;
string last;
};
int main()
{
Names customer ("Smith", "Orley");
cout << Names.first << endl;
cout << Names.last << endl;
return 0;
}
B) struct TwoVals
{
int a = 5;
int b = 10;
};
int main()
{
TwoVals v;
cout << v.a << " " << v.b;
return 0;
}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.