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; }
Regenia
1 months agoStarr
1 months agoCorinne
3 days agoNicolette
10 days agoDean
15 days agoBettyann
16 days agoAlisha
27 days agoEmile
1 months agoShelba
25 days agoShelba
28 days agoStefany
1 months agoTijuana
1 months agoRomana
1 months agoStarr
2 months agoRodrigo
2 months agoBette
14 days agoNorah
16 days agoDenny
17 days agoPaz
1 months ago