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
3 months agoMan
3 months agoDacia
3 months agoReena
2 months agoMelissa
3 months agoTheola
3 months agoRessie
3 months agoMan
3 months agoCathrine
3 months agoLyda
3 months agoLuis
3 months agoRupert
3 months agoSheridan
3 months agoElina
4 months agoJaime
3 months agoTricia
3 months agoJulieta
3 months agoTheola
4 months ago