What happens when you attempt to compile and run the following code?
#include
#include
using namespace std;
class A
{
int a,b;
public:
A & operator =(const A & c) { a = c.a; return *this;}
A():a(0),b(0){}
void setA(int a) {this?>a = a;} void setB(int b) {this?>b = b;}
int getA() {return a;} int getB() {return b;}
};
int main ()
{
vectorv;
A a;
a.setA(10); a.setB(11);
v.push_back(a);
A b = v.front(); v.pop_back();
cout< return 0; }
Ben
6 months agoShawn
6 months agoTrina
7 months agoParis
7 months agoRaul
7 months agoStevie
7 months agoSonia
7 months agoPhillip
7 months agoOlive
7 months agoCecilia
7 months agoAlfreda
7 months agoLouis
7 months agoRolland
7 months agoRaymon
7 months ago