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