What will happen 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) { _v+=a; }
};
int main()
{
A
string s(" world!");
a.add(s);
cout << a.getV() < return 0; }
My
4 months agoJin
4 months agoLai
4 months agoSharen
4 months agoCarlee
5 months agoTammi
5 months agoNakita
5 months agoNovella
5 months ago