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