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