Skip to content

Instantly share code, notes, and snippets.

View kazmura11's full-sized avatar

Kaz Mu kazmura11

View GitHub Profile
@kazmura11
kazmura11 / puyo.cpp
Last active August 29, 2015 14:13
ぷよぷよの問題(人材募集企画 2011年版 問題2)
// 3.5h
#include <iostream>
#include <memory.h>
namespace Puyo
{
struct Check2D
{
int x;
int y;
@kazmura11
kazmura11 / opeover.cpp
Last active February 25, 2020 14:12
オペレーターオーバーロードのサンプル
#include <iostream>
#include <memory>
#include <string>
#include <iomanip>
class Foo {
private:
int a_;
int b_;
int c_;
@kazmura11
kazmura11 / rvotest.cpp
Last active August 29, 2015 14:08
RVO/NRVOのテスト
#include <iostream>
// フツーこんなのなしだけどstringを継承したデバッグ用のクラス
class mystring : public std::string {
public:
// コンストラクタ
mystring() : std::string()
{
std::cout << "mystring constructor"
<< " mystring() called!" << std::endl;
@kazmura11
kazmura11 / MFCGoogleMapAppDlg.cpp
Last active August 29, 2015 14:08
MFCGoogleMapAppDlg.cppのソース
// MFCGoogleMapAppDlg.cpp : 実装ファイル
//
#include "stdafx.h"
#include "MFCGoogleMapApp.h"
#include "MFCGoogleMapAppDlg.h"
#include "afxdialogex.h"
#ifdef _DEBUG
@kazmura11
kazmura11 / MFCGoogleMapAppDlg.h
Last active August 29, 2015 14:08
MFCGoogleMapAppDlg.hのソース
// MFCGoogleMapAppDlg.h : ヘッダー ファイル
//
#pragma once
// CMFCGoogleMapAppDlg ダイアログ
class CMFCGoogleMapAppDlg : public CDHtmlDialog
{
@kazmura11
kazmura11 / MFCGoogleMapApp.htm
Last active August 29, 2015 14:08
MFCGoogleMapAppのhtml
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false"></script>
<title></title>
<script type="text/javascript">
var map;
@kazmura11
kazmura11 / Prototype.cpp
Created October 4, 2014 21:17
Design Pattern Prototype
#include <iostream>
#include <map>
#include <string>
namespace {
enum RECORD_TYPE_en
{
CAR, BIKE, PERSON
};
const int NUM_OF_RECORD_TYPE_en = 3;
@kazmura11
kazmura11 / AbstractFactory.cpp
Created October 4, 2014 21:15
Design Pattern Abstract Factory
#include <iostream>
class Button {
public:
virtual void paint() = 0;
virtual ~Button() { }
};
class WinButton : public Button {
public:
@kazmura11
kazmura11 / map1.cpp
Created October 4, 2014 21:11
STL map
#include <iostream>
#include <string>
#include <list>
#include <map>
#include <sstream>
using namespace std;
struct BWH {
string birthOfDate;
@kazmura11
kazmura11 / Factory.cpp
Created October 4, 2014 21:04
Design Pattern Factory
#include <iostream>
class Computer
{
public:
virtual ~Computer() {}
virtual void run() = 0;
virtual void stop() = 0;
};