This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <malloc.h> | |
struct node { | |
int data; | |
struct node *link; | |
}; | |
typedef struct node stack; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <malloc.h> | |
struct node { | |
int data; | |
struct node *link; | |
}; | |
typedef struct node stack; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <time.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdbool.h> | |
void initmovielist(void); | |
void inituserlist(void); | |
int displaymenu(void); | |
int displayadminmenu(void); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void cancle_movie_ticket(void) | |
{ | |
long long curtimetick, flagtick; | |
system("cls"); | |
char buf[20], moviebuf[20]; memset(buf, 0, sizeof(buf)); memset(moviebuf, 0, sizeof(buf)); | |
bool ok = false; | |
printf("\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t "); printf("ํ์ ์ด๋ฆ์ ์ ๋ ฅํด์ฃผ์ธ์: "); scanf("%s", buf); | |
for (int i = 0; i < _msize(user) / sizeof(*user); i++) { | |
ok = true; | |
if (!strcmp(buf, user[i].name)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void cancle_movie_ticket(void) | |
{ | |
long long curtimetick, flagtick; | |
system("cls"); | |
char buf[20], moviebuf[20]; memset(buf, 0, sizeof(buf)); memset(moviebuf, 0, sizeof(buf)); | |
bool ok = false; | |
printf("\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t "); printf("ํ์ ์ด๋ฆ์ ์ ๋ ฅํด์ฃผ์ธ์: "); scanf("%s", buf); | |
for (int i = 0; i < _msize(user) / sizeof(*user); i++) { | |
ok = true; | |
if (!strcmp(buf, user[i].name)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static int display_movie_list(void) | |
{ | |
int movienumber; | |
while (1) { | |
system("cls"); // ํ๋ฉด ์ด๊ธฐํ | |
printf("\n\n\n\n\n\n\n\n\n"); | |
printf("\t\t\t "); printf(" ์์์ค์ธ ์ํ๋ฆฌ์คํธ์ ๋๋ค \n"); | |
printf("\t\t\t "); printf(" ์ํ์๋ ์ํ ๋ฒํธ๋ฅผ ์ ํํด์ฃผ์ธ์ \n"); | |
printf("\t\t\t "); printf(" ================================================================= \n"); | |
printf("\t\t\t "); printf("|| 1- ์๋ผ๋ ||\n"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void cancle_movie_ticket(void) | |
{ | |
long long curtimetick, flagtick; | |
system("cls"); | |
char buf[20], moviebuf[20]; memset(buf, 0, sizeof(buf)); memset(moviebuf, 0, sizeof(buf)); | |
bool ok = false; | |
printf("\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t "); printf("ํ์ ์ด๋ฆ์ ์ ๋ ฅํด์ฃผ์ธ์: "); scanf("%s", buf); | |
for (int i = 0; i < _msize(user) / sizeof(*user); i++) { | |
ok = true; | |
if (!strcmp(buf, user[i].name)) { // ํ์ ์ ๋ณด์ ๋ง๋ค๋ฉด |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void check_admin(int adminpswd) | |
{ | |
Movie **ptr; | |
int pswd, choicenum, price, idx; | |
long long curtimetick, flagtick; | |
char moviename[20]; | |
system("cls"); | |
printf("\n\n\n\n\n\n\n\n\n\n");printf("\t\t\t "); | |
printf("๊ด๋ฆฌ์ ๋น๋ฐ๋ฒํธ๋ฅผ ์ ๋ ฅํ์ธ์ : "); scanf("%d", &pswd); | |
if (pswd == adminpswd) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void error_handler(long long sec, char msg1[], char msg2[]) | |
{ | |
long long curtimetick, flagtick; | |
curtimetick = clock(); | |
flagtick = curtimetick / CLOCKS_PER_SEC; | |
system("cls"); | |
printf("\n\n\n\n\n\n\n\n\n\n"); printf("\t\t\t\t\t# "); printf("%s\n", msg1); | |
printf("\t\t\t\t\t# "); printf("%lld์ด ์์ %s\n", sec - (clock() - curtimetick) / CLOCKS_PER_SEC, msg2); | |
while ((clock() - curtimetick) / CLOCKS_PER_SEC < sec) { | |
if (flagtick != (clock() - curtimetick) / CLOCKS_PER_SEC) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <queue> | |
#include <vector> | |
#include <iostream> | |
#include <functional> | |
using namespace std; | |
priority_queue <pair<int, char>, vector <pair<int, char>>, greater<pair<int, char>>> pq; | |
int main(void) { |