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; }
Rolf
5 months agoNickie
6 months agoAlexis
6 months agoRosann
6 months agoAnnmarie
6 months agoHannah
6 months agoEdna
7 months agoRashida
7 months agoSharan
7 months ago