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