내가 스택을 이용해서 이불쌓기 프로그램을 만들고있는데

진짜 공부를 못한다. 뭐가 문제인지 알려줘라






#include "stdafx.h"
#include <string>
#include <iostream>
using namespace std;

typedef struct _node {
 string val;
 struct _node* next;
}node;

typedef node* np;

typedef struct _stack {
 int count;
 np top;
}stack;

void stackReset(stack* s) // 스택 초기화 함수
{
 s->count = 0;
 s->top = NULL;
}
void push(stack* s, string val) // 스택 삽입 함수
{
 np nnp = (np)malloc(sizeof(node));
 nnp->val = val;
 nnp->next = s->top;
 s->top = nnp;
 s->count++;
}
string pop(stack* s) // 스택 삭제 함수
{
 if (s->count > 0) {
  np tmp = s->top;
  s->top = tmp->next;
  string pop_val = tmp->val;
  free(tmp);
  s->count--;
  return pop_val;
 }
 else {
  cout << "꺼낼 이불이 없습니다." << endl;
  return 0;
 }
}
string getTop(stack* s) // top 값 반환 함수
{
 if (s->count > 0) return s->top->val;
 else {
  cout << "꺼낼 이불이 없습니다." << endl;
  return 0;
 }
}
int getCount(stack* s) // count 값 반환 함수
{
 return s->count;
}
int main()
{
 stack* mystack = (stack*)malloc(sizeof(stack));
 int num=0;
 string name;
 while (num != 4)
 {
 cout << "<1> 현재 이불장속 이불 개수 확인" << endl;
 cout << "<2> 이불 넣기" << endl;
 cout << "<3> 이불 꺼내기" << endl;
 cout << "<4> 종료" << endl;
 cout << "번호를 선택하세요";
 cin >> num;
  switch (num)
  {
  case 1:
   cout << getCount(mystack) << endl;
   break;

  case 2:
   cout << "이불 이름 : ";
   cin >> name;
   push(mystack, name);

  case 3:
   cout << pop(mystack) << "을 꺼냈습니다." << endl;

  case 4: return 0;
  default:
   break;
  }
 }
    return 0;
}