C/C++

C言語を仕事で書いた

記念すべき日である。 祝おう!

ビット演算事始め

スイッチのOFF/ONを確認する場合などに使う irb(main):004:0> 0b1101 & 0b0001 > 0 => true irb(main):007:0> 0b1101 & 0b0010 > 0 => false

苦C復習

// // main.c // Second // // //*.hファイルとか #ifndef _INCLUDE_MAIN_ #define _INCLUDE_MAIN_ int sum(int min,int max); extern int Public; #endif #include <stdio.h> #include <stdlib.h> #include <string.h> /** * ネズミ算 * 100万まで */ int nezumi(); /** * staticのテスト</string.h></stdlib.h></stdio.h>…

xcodeを強くする

ainame.hateblo.jp 便利。

苦C一周した。まだまだだ。

一周しましたがコレ、復習しないとだめだな。最初の方のこと忘却の彼方に置き忘れておる。 練習問題が解答できるようにならないとですね。 2日勉強したソースコードの断片が以下。汚い。 #include <stdio.h> #include <memory.h> #include <ctype.h> #include <stdlib.h> #include <string.h> #include "sum.</string.h></stdlib.h></ctype.h></memory.h></stdio.h>…

xcodeで

本当は会社でも使っているeclipseを使いたかったのだけれどmacのeclipseのc/c++はどうもうまく動かない。xcodeでも書けるみたいなのでxcodeで。補完も効きまくって良い感じ。デフォルトでEmacsライクなキーバインドも良し。Objective-C or Swiftの案件もあり…