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