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
5 months agoShawn
5 months agoTrina
5 months agoParis
5 months agoRaul
5 months agoStevie
6 months agoSonia
6 months agoPhillip
6 months agoOlive
6 months agoCecilia
6 months agoAlfreda
6 months agoLouis
6 months agoRolland
6 months agoRaymon
6 months ago