#include <iostream>
using namespace std;
class Print {
public:
void show(int x) {
cout << "int: " << x << endl;
}
void show(string str) {
cout << "string: " << str << endl;
}
};
int main() {
Print ob1;
ob1.show(25);
ob1.show("apna college");
return 0;
}
OUTPUT:-
int: 25
string: apna college
No comments:
Post a Comment