<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>C++でゲームを作ってみる。</title>
<link>https://ameblo.jp/gm-prgrmng/</link>
<atom:link href="https://rssblog.ameba.jp/gm-prgrmng/rss20.xml" rel="self" type="application/rss+xml" />
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com" />
<description>C++を基礎から学んで、ゲーム作れるようになりたい、ってブログ。</description>
<language>ja</language>
<item>
<title>ポインタ！</title>
<description>
<![CDATA[ <div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">C/C++独特のポインタ。</div><span style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">ここでつまずく初心者が多いらしいですね。</span><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br><div>そこで、初心者だからこそ教えられるものがあると信じて、</div><div>ポインタのイメージから具体的な使い方まで、僕なりの解釈で書いてみたいと思います(*・∀・*)</div></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">プログラムの中で出てくる全ての変数は(本当に全てか怪しいし、変数以外もいろいろあると思うけど)、メモリ上に置かれます。置かれた場所には番号があって、その番号をアドレスって言います。アドレス(adress)って住所って意味ですよね。変数が住んでる場所ってイメージです。</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">それと、</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">「アドレスが同じ変数は、名前が違うとしても、全く同じ変数として扱われる」…♡&nbsp;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">ってことは覚えておいてください。二人いても、住所が一致したなら同じ人ってなっちゃうんです。</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">たとえば、a と b って変数があって、この二つのアドレスが一緒だったとした時、a=3 とすると勝手にbにも3が代入され、逆にb=7とすれば、勝手にaにも7が代入されます。だってこの２つは名前が違っても、全く同じものなんですから。</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">ここでポインタの登場です！(*・∀・*)</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">ポインタっていうのは、そのアドレス(住所)を入れることができる"変数"です。そうですポインタも変数です！！だからそのポインタもメモリ上のどこかに住んでるですけど、ややこしいのでそのことは置いておきます。とにかく、</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">「ポインタはある変数のアドレスを入れとくための変数」…☆&nbsp;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">だってことです。</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">☆を文章だけじゃなくて、プログラムでも説明してみます。</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">#include&lt;iostream&gt;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">using namespace std;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">int main(){</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">&nbsp; &nbsp;int a; &nbsp; &nbsp; &nbsp;//☆で言う、「ある変数」のこと。</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">&nbsp; &nbsp;int* p; &nbsp; &nbsp;//これがポインタ。</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">&nbsp; &nbsp;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">&nbsp; &nbsp;p=&amp;a &nbsp; &nbsp; /*&amp;を変数の前につけると、アドレスがわかります。</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;そのアドレスをポインタpに代入してるだけです。*/</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">}</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">アドレスを代入するだけだと、ポインタなんて使わないで普通の変数だけでいい感がしますが、もちろんポインタの機能はまだまだあります。</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">言ってしまえば、</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">「あるポインタpがあった時、 *p と書くと、pに入ってるアドレスを持った普通の変数に変わる」…△&nbsp;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">のです。</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">例えば、さっきみたいに、int a; なんてして、int* p; p=&amp;a; とした時、pにはａのアドレスが入ってますね。ここで *p ってしてみると、△に書いたように、*pはａのアドレスを持った変数になります。ここでさらに♡に書いたことを思い出すと、a と *p は見た目は違くても、全く同じ変数ってことになります。a=3ってすれば*pも勝手に3になるし、*p=5ってすればaも勝手に5になります。</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">すごく長ったらしく書きましたが、さらにプログラムで書けばこんな感じです。</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">#include&lt;iostream&gt;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">using namespace std;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">int main(){</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">int a;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">int* p;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">p=&amp;a; &nbsp;//ここまでさっきと同じ(☆)</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">//この時、同じアドレスを持つaと*p(△)は全く同じもの！(♡)</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">a=3;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">cout&lt;&lt;"a="&lt;&lt;a&lt;&lt;" *p="&lt;&lt;*p&lt;&lt;endl;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">*p=5;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">cout&lt;&lt;"a="&lt;&lt;a&lt;&lt;" *p="&lt;&lt;*p&lt;&lt;endl;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">//どちらの場合も、ａと*pの値は等しくなってる。</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">}</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">すごく基本的なことですが、それだけにゆっくり説明してみました。</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">ゆっくりすぎてわかりにくいでしょうか？？笑</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">これを読んでポインタ納得できた人がいたら嬉しいです。</div>
]]>
</description>
<link>https://ameblo.jp/gm-prgrmng/entry-12005286680.html</link>
<pubDate>Mon, 23 Mar 2015 22:12:27 +0900</pubDate>
</item>
<item>
<title>&quot;Hello World&quot;</title>
<description>
<![CDATA[ <br style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">プログラミング言語を学ぶとき、一番最初に書く定番のプログラムといえば、もちろんHello Worldですよね！</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">C++だと、</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">#include&lt;iostream&gt;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">using namespace std;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">int main(){</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">&nbsp; &nbsp;cout&lt;&lt;"Hello World"&lt;&lt;endl;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">}</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">って感じです。</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">たぶんほとんどの人の生まれて初めて書いたプログラムはHello Worldだと思うんですけど、</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">僕の場合は全然違うプログラムだったんです笑</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">プログラミングとの出会いは中学生の時でした。その時の友達に、プログラミングが趣味の人がいて、その人と話しているうちにほんの少しですがプログラミングを覚えました。そのとき僕がが初めての書いたのが、次のようなプログラムです。</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">e</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">#include&lt;iostream&gt;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">using namespace std;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">int main(){</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">&nbsp; &nbsp;double a,b;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">&nbsp; &nbsp;cin&gt;&gt;a&gt;&gt;b;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">&nbsp; &nbsp;cout&lt;&lt;-b/a&lt;&lt;endl;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">}</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">本当は言語はBasicだったんですが、今ではBasicはさっぱり忘れてしまっったのでC++で書きました(^^;;</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">あと実際には紙に書いただけです。その頃はパソコンとか持ってなかったんです。</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">その時の僕は「実数xについての方程式ax+b=0の解」を求めるプログラムのつもりで書きました。</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">aが0の時(割れない)とか、a,b両方が0の時(xはなんでもあり)とかいろいろカバー出来てないところはありますが、</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">初プログラミングで、なんの参考書も見ずにいきなりこれを思いついたんですから、我ながらなかなかやるなと思います笑</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><br></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">実際の所、初めてのプログラムってどんなものなんでしょうか？？</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">やっぱりHello Worldですかね？</div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;">よかったら教えてください(*^^*)</div>
]]>
</description>
<link>https://ameblo.jp/gm-prgrmng/entry-12003306514.html</link>
<pubDate>Thu, 19 Mar 2015 01:17:39 +0900</pubDate>
</item>
<item>
<title>better C</title>
<description>
<![CDATA[ <div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><span style="background-color: rgba(255, 255, 255, 0);"><br>何をどう書けばいいのか、まだよくわからないので、今日やったことを書いてみます。<br><br></span></div><div style="color: rgba(0, 0, 0, 0.701961); font-family: UICTFontTextStyleBody; font-size: 17px; line-height: normal; -webkit-composition-fill-color: rgba(130, 98, 83, 0.0980392); text-decoration: -webkit-letterpress;"><div><span style="background-color: rgba(255, 255, 255, 0);">僕が使っている参考書は、「ロベールのC++入門講座」という本です。</span></div><div><span style="background-color: rgba(255, 255, 255, 0);">すごく分厚い本で、かなり前に興味本位で買ったんですが、</span></div><div><span style="background-color: rgba(255, 255, 255, 0);">半分も読まずに本棚の飾りになってたやつです笑</span></div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div><span style="background-color: rgba(255, 255, 255, 0);">今日は第3章まで読みました。</span></div><div><span style="background-color: rgba(255, 255, 255, 0);">読んでみると意外と覚えていて、一気に読めました。</span></div><div><span style="background-color: rgba(255, 255, 255, 0);">でもまだC言語+αって感じで、ポインタやクラスはこれからです。</span></div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div><span style="background-color: rgba(255, 255, 255, 0);">まだまだ半分にも達していませんが、地道に頑張って行きます！</span></div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div><span style="background-color: rgba(255, 255, 255, 0);">ちなみに、この本を読破したら、「Effective C++」と 「ゲームプログラマになる前に覚えておきたい技術」という本を並行して読んでいこうかと考えています。</span></div><div><span style="background-color: rgba(255, 255, 255, 0);">実はEffective C++は一回読んだことがあります。もちろんほとんど忘れましたが笑</span></div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div></div>
]]>
</description>
<link>https://ameblo.jp/gm-prgrmng/entry-12003264347.html</link>
<pubDate>Wed, 18 Mar 2015 23:20:17 +0900</pubDate>
</item>
<item>
<title>軽く自己紹介</title>
<description>
<![CDATA[ 初めまして！<br><br><br><br>これからこのブログを書いていく、SDKMです。よろしくお願いします(^^;;<br><br><br><br>少し自己紹介しておきますね。<br><br><br><br>僕は今年高校を卒業して、浪人することになりました。<br><br>浪人すると、自由な時間が増えそうなので、昔からしたいと思っていたゲームプログラミングを少しずつ始めようと思い立ったわけです。<br><br>実は僕は高校にいた時にもC++は使っていたんですが、受験勉強が始まってC++に全く触れなくなった途端に急に腕が落ちて、ほぼ初心者に戻ってしまったみたいなんです(´・ω・｀)<br><br>だからまた基礎からやり直しです(´・ω・｀)<br><br><br><br>最終的に作れたらいいなと思うのは、やっぱりFFやドラクエみたいなRPG。<br><br>ゲームをするのも大好きですが、自分のアイディアで自分のゲームを作れたらきっともっと楽しいはず！！<br><br><br><br>ってことで、まあとにかく始めます笑
]]>
</description>
<link>https://ameblo.jp/gm-prgrmng/entry-12002909144.html</link>
<pubDate>Wed, 18 Mar 2015 06:00:00 +0900</pubDate>
</item>
</channel>
</rss>
