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; }
Geraldo
6 months agoHubert
6 months agoNorah
7 months agoTony
6 months agoTony
6 months agoBritt
6 months agoShay
6 months agoLucia
7 months agoErinn
6 months agoStephanie
6 months agoWillodean
6 months agoAlaine
7 months agoRobt
8 months agoLajuana
8 months agoLashandra
7 months agoArt
7 months agoGiuseppe
7 months agoFrank
7 months agoLinette
7 months agoNoble
7 months agoRoxanne
7 months agoJennifer
8 months agoAja
8 months ago