2008-08-01から1ヶ月間の記事一覧

C言語メモ

C

「独習C」から印象的だったものを。 #include <stdio.h> #include <ctype.h> void string_up(char *p); int main(void) { char str[] = "This is a test."; string_up(str); printf(str); return 0; } void string_up(char *p) { while (*p) { *p = toupper(*p); p++; } } こ</ctype.h></stdio.h>…

C言語メモ

C

ポインタには、加減算しかできない。 (乗除算はできない) *p++; // ポインタそれ自体がインクリメント (*p)++; // ポインタの指すものがインクリメント

Qt で Windows アプリケーションを作成

Qt 4.4.1 Open Source 版での話。 まず Qt 4.4.1 Command Prompt を起動。ソースコードのあるディレクトリに移動し、 qmake -project で pro ファイルを作成。続いて、 qmake で MakeFile を作成する。最後に、 make release で、release ディレクトリの下に…