Question: 1. Correct the logic/syntax error in the code below to produce the correct output, WITHOUT CHANGING ITS FLOW. 2. Explain in detail the reason/concept behind
1. Correct the logic/syntax error in the code below to produce the correct output, WITHOUT CHANGING ITS FLOW.
2. Explain in detail the reason/concept behind the error.
MY CODE SAYS NO "class A " HAS NO MEMBER FUNCTION "add(), Line 22.

code for reference:
#include
using namespace std;
template
class A{
private:
C a,b;
public:
A (Cx,Cy){
a=x;
b=y;
}
void show(){cout
}
C add(){
C c=a+b;
return c;
}
};
int main(){
A
d.add();
return 0;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
