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