Skip to content

Instantly share code, notes, and snippets.

View sumnjc's full-sized avatar

Yoo Joung Sik sumnjc

  • Korea
View GitHub Profile
/*
* 함수포인터를 사용하여 전략패턴을 구사
* vector 사용
*/
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <vector>
@sumnjc
sumnjc / gist:ab329c647af05f10ad3b
Created April 20, 2015 00:17
Template Method Pattern
#include <iostream>
#include <string>
using namespace std;
class CMakeDrink{
private:
virtual void make()=0;
virtual void addOption()=0;
@sumnjc
sumnjc / gist:7293477c5a51392ad740
Last active August 29, 2015 14:13
const - 함수선언
#include <iostream>
using namespace std;
class DummyClass{
private:
int a;
public:
DummyClass(int _a):a(_a){
}
@sumnjc
sumnjc / thread2.cpp
Created December 10, 2012 04:43
POCO Simple Thread example using threadpool
// sample of using POCO's ThreadPool
#include "Poco/Runnable.h"
#include "Poco/ThreadPool.h"
#include <iostream>
using namespace std;
class Worker:public Poco::Runnable{
public:
@sumnjc
sumnjc / thread1.cpp
Created December 10, 2012 03:25
POCO Simple Thread example
// sample of using POCO's Thread
#include "Poco/Runnable.h"
#include "Poco/Thread.h"
#include <iostream>
using namespace std;
class Worker:public Poco::Runnable{
public: