Find the Errors in the C++ Programs
struct TwoVals
{
int a, b;
};
int main ()
{
TwoVals.a = 10;
TwoVals.b = 20;
return 0;
}
#include
using namespace std;
struct ThreeVals
{
int a, b, c;
};
int main()
{
ThreeVals vals = {1, 2, 3};
cout << vals << endl;
return 0;
}
#include
#include
using namespace std;
struct names
{
string first;
string last;
};
int main ()
{
names customer = "Smith", "Orley";
cout << names.first << endl;
cout << names.last << endl;
return 0;
}