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; }
Geraldo
2 months agoHubert
2 months agoNorah
2 months agoTony
1 months agoTony
2 months agoBritt
2 months agoShay
2 months agoLucia
2 months agoErinn
1 months agoStephanie
2 months agoWillodean
2 months agoAlaine
3 months agoRobt
3 months agoLajuana
3 months agoLashandra
2 months agoArt
2 months agoGiuseppe
2 months agoFrank
2 months agoLinette
2 months agoNoble
3 months agoRoxanne
3 months agoJennifer
3 months agoAja
3 months ago