전체 글 POS Project fundamental frame #include "stdafx.h"#include #include void Run(bool bPrint); int main(void) {using namespace std; cout 카테고리 없음 2018. 2. 2. enum #include "stdafx.h"#include #include enum State {Stop,Playing,Paused}; State CIn(void) {using namespace std; string input; cin >> input; if (input == "Playing") {return Playing;}else if (input == "Paused") {return Paused;}else {return Stop;} } int main() {using namespace std;State play = Playing; while (true) {if (play == Playing){cout 카테고리 없음 2018. 2. 2. struct_string2 #include "stdafx.h"#include #include struct String {char *str = 0;int len = 0; void Print(void) {using namespace std; cout str = (char *)malloc(ret->len + 1); for (int n = 0; n len + 1; n++) {ret->str[n] = str[n];} return ret;} void delete_String(String *ptr) {free(ptr->str);free(ptr);} int main(void) {using namespace std; String *myStr = new_String("MyStr"); myStr->Print(); delete_String.. 카테고리 없음 2018. 2. 2. struct_string #include "stdafx.h"#include #include void *g_this = 0; struct String {char *str = 0;int len = 0; void (*Print)(void); }; String *new_String(const char *str) {String *ret = 0; ret = (String *)malloc(sizeof(String)); ret->len = strlen(str);ret->str = (char *)malloc(ret->len + 1); for (int n = 0; n len + 1; n++) {ret->str[n] = str[n];} return ret;} void delete_String(String *ptr) {free(ptr->.. 카테고리 없음 2018. 2. 2. struct #include "stdafx.h"#include #include struct String {char *str = 0;int len = 0; }; String *new_String(const char *str) {String *ret = 0; ret = (String *)malloc(sizeof(String)); ret->len = strlen(str);ret->str = (char *)malloc(ret->len + 1); for (int n = 0; n len + 1; n++) {ret->str[n] = str[n];} return ret;} void delete_String(String *ptr) {free(ptr->str);free(ptr);} int main(void) {using .. 카테고리 없음 2018. 2. 2. bool #include "stdafx.h"#include #include using namespace std; void Print(const char *str, bool endl = false) {cout 카테고리 없음 2018. 2. 2. overloading_parameter_setting #include "stdafx.h"#include #include using namespace std; void Print(const char *str, bool endl = false) {cout num; Print("입력하신 정수는 ");cout 카테고리 없음 2018. 2. 2. overloading #include "stdafx.h"#include #include using namespace std; void Print(const char *str, bool endl) {cout 카테고리 없음 2018. 2. 2. 이전 1 ··· 3 4 5 6 7 8 9 다음