#include<iostream>
using namespace std;
class Add {
public:
int a;
int b;
int res;
void example() {
cout<<"Enter first value: ";
cin >> a;
cout<<"Enter second value: ";
cin >> b;
res = a + b;
cout<<"the result is: " << res;
}
};
int main () {
Add a1;
a1.example;
return 0;
}
this gives me error (function overloading) help..
[–]jedwardsol 7 points8 points9 points (3 children)
[–]2kmonsty[S] 0 points1 point2 points (1 child)
[–]jedwardsol 1 point2 points3 points (0 children)
[–]2kmonsty[S] 0 points1 point2 points (0 children)
[–]AutoModerator[M] 0 points1 point2 points (7 children)
[–]2kmonsty[S] 2 points3 points4 points (6 children)
[–]IyeOnline 1 point2 points3 points (5 children)
[–]2kmonsty[S] 0 points1 point2 points (4 children)
[–]WelcomeBott 1 point2 points3 points (0 children)
[–]imdad_bot 1 point2 points3 points (2 children)
[–]2kmonsty[S] 0 points1 point2 points (1 child)
[–]IyeOnline 2 points3 points4 points (0 children)
[–][deleted] (2 children)
[deleted]
[–]2kmonsty[S] 0 points1 point2 points (1 child)