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