how to call the display method on the main function?????

class Humanresource{
public:
class Employe{
public:
void display(){
cout << " your are an employe " ;
}
};
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <iostream>
#include <cstdlib>	
#include <string>
using namespace std;

class Humanresource
{
public:
  class Employe
  {
  public:
    void display()
    {
      cout << " your are an employe " ;
    }
  };
};

int main()
{
  Humanresource::Employe emp; 

  emp.display();

  system("PAUSE");
  return 0;
}


It would make more sense if Employe inherits from Humanresource since an Employe is a Humanresource.
Topic archived. No new replies allowed.