전화번호부를 만드는 프로그래밍인데요.

 

메뉴선택은 1, 2, 3 이 있고

1번은 등록
2번은 출력

3번은 종료에요..

1번 등록은 5개의 값을 이름 과 전화번호를 입력받아 저장하고
2번 출력에서 5개의 값을

이름 : 뭐시기 전화번호 : 0000
이름 : 거시기   전화번호 : 0001
이름 : 저시기   전화번호 : 0002
이름 : 고시기   전화번호 : 0003
이름 : 자시기   전화번호 : 0004

이런식으로 뿌려주면 되는데..제가 일단 짠건...

#include <iostream>
#include <conio.h>
#include <string.h>

using namespace std;

class Telephone{

private:

             char name[20]; //이 름

             char phone[20]; //핸드폰 번호

public:

             Telephone(char*,char*);

             void Show()const; //출력함수

           

};

Telephone::Telephone(char* n,char* p)

{

             strcpy(this->name , n);

             strcpy(this->phone , p);

}

void Telephone::Show()const

{

             cout << "이 름 : " << this->name << "  전화번호 : "<< this->phone << endl;

}


int main()
{
 Telephone *pT[5];

             int i;

             char name[20],phone[20];
int z=0;

cout << "t*** 전화번호부 ***t"<<endl<<endl;
cout << "1. 등록" <<endl;
cout << "2. 출력" <<endl;
cout << "0. 프로그램 종료" <<endl<<endl;
cout << "메뉴 선택:[ ]bb";

cin >> z;
if(z==1){


 

             //for문을 돌려서 동적할당, 입력받은 인수 전달

             cout << "** 전화 번호 입력 **" << endl;

             for(i=0; i<5; i++)

             {           

                           cout << " 이    름:";

                           cin >> name;

                           cout << " 전화번호:";

                           cin >> phone;

                           pT[i] = new Telephone(name,phone);

             }

 getchar();
 return main();
}
else if(z==2)
{
 
           for(i=0; i<5; i++)

             {

                           pT[i]->Show();

                           delete pT[i];

             }
 getchar();
 return main();
}
else if(z==0)
{
return 0;
}
  else
  cout<<"잘못 입력하셨습니다.n";
 getchar();

}


이런식인데..입력이 안들어가는지 출력도 안되더라고요..ㅠㅠ

혹시나 아시는 능력자 분 있으시면..조금 도와주세요.ㅠㅠ
비주얼 초보라서 이렇게 부탁드립니다...