// Solution to Exercise 7_1 #include using std::cout; using std::endl struct Sample { int value1; int value2; }; int main() { Sample a; Sample b; a.value1 = 1; a.value2 = 2; cout << "a=(" << a.value1 << "," << a.value2 << ")" << endl; // b contains junk values cout << "b=(" << b.value1 << "," << b.value2 << ")" << endl; b = a; cout << "After assigning a to b:" << endl; cout << "b=(" << b.value1 << "," << b.value2 << ")" << endl; return 0; }