What happens when you attempt to compile and run the following code?
#include
#include
using namespace std;
template
class A {
T_v;
public:
A() {}
A(T v): _v(v){}
T getV() { return _v; }
void add(T & a);
void add(string & a);
};
template
void A
void A
_v.insert(0, a);
}
int main()
{
A
string s(" world!");
a.add(s);
cout << a.getV() < return 0; }
Precious
2 months agoMan
2 months agoDacia
2 months agoReena
1 months agoMelissa
1 months agoTheola
2 months agoRessie
2 months agoMan
2 months agoCathrine
2 months agoLyda
1 months agoLuis
1 months agoRupert
1 months agoSheridan
2 months agoElina
2 months agoJaime
1 months agoTricia
1 months agoJulieta
1 months agoTheola
2 months ago