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