What happens when you attempt to compile and run the following code?
#include
#include
#include
using namespace std;
class A {
int a;
public:
A(int a) : a(a) {}
int getA() const { return a; } void setA(int a) { this?>a = a; }
};
struct Even {
bool operator ()(const A & a, const A &b) {
return (a.getA() % 2)==b.getA() % 2;
}
};
int main () {
int t[] = {1,2,3,2,3,5,1,2,7,3,2,1,10, 4,4,5};
deque
deque
cout<< it?d.begin()< return 0; } Program outputs:
Currently there are no comments in this discussion, be the first to comment!