Find the Errors
Each of the following declarations, programs, and program segments has errors. Locate as many as you can.
A) struct TwoVals
{
int a, b;
};
int main()
{
TwoVals.a = 10;
TwoVals.b = 20;
return 0;
}
B) #include <iostream>
using namespace std;
struct ThreeVals
{
int a, b, c;
void ThreeVals()
{a = 1; b = 2; c = 3;}
};
int main()
{
ThreeVals vals;
cout << vals << endl;
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.