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
8 months agoStarr
8 months agoJacqueline
7 months agoCorinne
7 months agoNicolette
7 months agoDean
7 months agoBettyann
7 months agoAlisha
8 months agoEmile
8 months agoShelba
8 months agoShelba
8 months agoStefany
8 months agoTijuana
8 months agoRomana
8 months agoStarr
9 months agoRodrigo
9 months agoBette
7 months agoNorah
7 months agoDenny
8 months agoPaz
8 months ago