write a c++ program for Hermoine and Ron blessed with a baby. They need to name their child and the priest doesn't know the actual spelling of it. So, help them to get and display the child's name.
Answers
Answered by
1
Answer:
#include <iostream>
using namespace std;
// first name space
namespace first_space {
void func() {
cout << "Inside first_space" << endl;
}
}
// second name space
namespace second_space {
void func() {
cout << "Inside second_space" << endl;
}
}
int main () {
// Calls function from first name space.
first_space::func();
// Calls function from second name space.
second_space::func();
return 0;
}
Explanation:
how namespace scope the entities including variable and functions −
Similar questions